@flikk/ui 1.0.0-beta.11 → 1.0.0-beta.12
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/dist/components/ai/ApprovalCard/ApprovalCard.js +1 -1
- package/dist/components/ai/MessageHistory/MessageHistory.js +1 -0
- package/dist/components/ai/PromptInput/PromptInput.js +7 -125
- package/dist/components/ai/PromptInput/VoiceRecorder.js +0 -77
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +1 -0
- package/dist/components/ai/index.js +1 -0
- package/dist/components/core/Accordion/Accordion.d.ts +1 -1
- package/dist/components/core/Accordion/Accordion.js +2 -2
- package/dist/components/core/Accordion/Accordion.theme.d.ts +2 -2
- package/dist/components/core/Accordion/Accordion.theme.js +4 -4
- package/dist/components/core/Accordion/Accordion.types.d.ts +23 -18
- package/dist/components/core/Accordion/AccordionBody.d.ts +3 -0
- package/dist/components/core/Accordion/{AccordionContent.js → AccordionBody.js} +4 -4
- package/dist/components/core/Accordion/AccordionItem.js +1 -1
- package/dist/components/core/Accordion/AccordionTrigger.js +16 -7
- package/dist/components/core/Accordion/index.d.ts +2 -2
- package/dist/components/core/Alert/Alert.js +5 -1
- package/dist/components/core/Alert/Alert.types.d.ts +3 -3
- package/dist/components/core/Breadcrumbs/Breadcrumbs.js +7 -3
- package/dist/components/core/Breadcrumbs/Breadcrumbs.types.d.ts +1 -1
- package/dist/components/core/Button/Button.js +2 -8
- package/dist/components/core/Button/Button.theme.js +7 -7
- package/dist/components/core/Calendar/Calendar.js +3 -3
- package/dist/components/core/Card/Card.d.ts +2 -2
- package/dist/components/core/Card/Card.js +3 -3
- package/dist/components/core/Card/Card.theme.js +3 -3
- package/dist/components/core/Card/Card.types.d.ts +4 -4
- package/dist/components/core/Card/CardBody.d.ts +3 -0
- package/dist/components/core/Card/CardBody.js +11 -0
- package/dist/components/core/Card/index.d.ts +2 -2
- package/dist/components/core/Carousel/Carousel.js +4 -4
- package/dist/components/core/Carousel/Carousel.types.d.ts +4 -4
- package/dist/components/core/Carousel/CarouselBody.d.ts +4 -0
- package/dist/components/core/Carousel/{CarouselContent.js → CarouselBody.js} +3 -3
- package/dist/components/core/Carousel/index.d.ts +2 -1
- package/dist/components/core/ContextMenu/ContextMenu.d.ts +2 -2
- package/dist/components/core/ContextMenu/ContextMenu.js +6 -6
- package/dist/components/core/ContextMenu/ContextMenu.types.d.ts +2 -2
- package/dist/components/core/ContextMenu/ContextMenuBody.d.ts +6 -0
- package/dist/components/core/ContextMenu/{ContextMenuContent.js → ContextMenuBody.js} +4 -4
- package/dist/components/core/ContextMenu/ContextMenuSubBody.d.ts +6 -0
- package/dist/components/core/ContextMenu/{ContextMenuSubContent.js → ContextMenuSubBody.js} +4 -4
- package/dist/components/core/ContextMenu/index.d.ts +1 -1
- package/dist/components/core/Drawer/Drawer.d.ts +2 -2
- package/dist/components/core/Drawer/Drawer.js +28 -9
- package/dist/components/core/Drawer/Drawer.theme.js +1 -1
- package/dist/components/core/Drawer/Drawer.types.d.ts +8 -6
- package/dist/components/core/Drawer/DrawerBody.d.ts +5 -0
- package/dist/components/core/Drawer/DrawerBody.js +11 -0
- package/dist/components/core/Drawer/index.d.ts +2 -1
- package/dist/components/core/Dropdown/Dropdown.types.d.ts +3 -3
- package/dist/components/core/Dropdown/DropdownSection.js +3 -1
- package/dist/components/core/MenuItem/MenuItem.js +3 -1
- package/dist/components/core/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/components/core/Message/Message.d.ts +1 -1
- package/dist/components/core/Message/Message.js +2 -2
- package/dist/components/core/Message/Message.types.d.ts +1 -1
- package/dist/components/core/Message/MessageBody.d.ts +8 -0
- package/dist/components/core/Message/{MessageContent.js → MessageBody.js} +3 -3
- package/dist/components/core/Message/index.d.ts +2 -0
- package/dist/components/core/Modal/Modal.js +5 -1
- package/dist/components/core/Modal/Modal.theme.js +1 -1
- package/dist/components/core/Modal/Modal.types.d.ts +5 -2
- package/dist/components/core/ModalStack/ModalStackModal.js +1 -0
- package/dist/components/core/PageHeading/PageHeading.types.d.ts +1 -1
- package/dist/components/core/PageHeading/PageHeadingBackButton.js +3 -1
- package/dist/components/core/Popover/Popover.d.ts +1 -1
- package/dist/components/core/Popover/Popover.js +4 -4
- package/dist/components/core/Popover/Popover.theme.d.ts +1 -1
- package/dist/components/core/Popover/Popover.theme.js +2 -2
- package/dist/components/core/Popover/Popover.types.d.ts +3 -3
- package/dist/components/core/Popover/PopoverBody.d.ts +7 -0
- package/dist/components/core/Popover/{PopoverContent.js → PopoverBody.js} +5 -5
- package/dist/components/core/Popover/index.d.ts +4 -3
- package/dist/components/core/Tabs/Tabs.animations.d.ts +2 -2
- package/dist/components/core/Tabs/Tabs.animations.js +3 -3
- package/dist/components/core/Tabs/Tabs.d.ts +1 -1
- package/dist/components/core/Tabs/Tabs.js +3 -3
- package/dist/components/core/Tabs/Tabs.theme.d.ts +1 -1
- package/dist/components/core/Tabs/Tabs.theme.js +2 -2
- package/dist/components/core/Tabs/Tabs.types.d.ts +9 -9
- package/dist/components/core/Tabs/TabsBody.d.ts +6 -0
- package/dist/components/core/Tabs/{TabsContent.js → TabsBody.js} +8 -8
- package/dist/components/core/Tabs/index.d.ts +2 -2
- package/dist/components/core/Toast/Toast.js +5 -1
- package/dist/components/core/Toast/Toast.types.d.ts +9 -9
- package/dist/components/core/index.js +6 -2
- package/dist/components/data-display/Feed/Feed.js +10 -2
- package/dist/components/data-display/Feed/Feed.types.d.ts +4 -4
- package/dist/components/data-display/GanttChart/GanttTaskContextMenu.js +1 -1
- package/dist/components/data-display/KPI/KPI.js +2 -2
- package/dist/components/data-display/KPI/KPI.types.d.ts +3 -3
- package/dist/components/data-display/Metric/Metric.js +2 -2
- package/dist/components/data-display/Metric/Metric.types.d.ts +3 -3
- package/dist/components/data-display/Table/TableColumnManager.js +2 -1
- package/dist/components/data-display/Table/TableFilter.js +2 -1
- package/dist/components/forms/Checkbox/Checkbox.js +1 -1
- package/dist/components/forms/Checkbox/Checkbox.types.d.ts +5 -5
- package/dist/components/forms/Checkbox/CheckboxGroup.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.js +2 -2
- package/dist/components/forms/ColorPicker/ColorPicker.types.d.ts +2 -2
- package/dist/components/forms/ColorPicker/ColorPickerBody.d.ts +7 -0
- package/dist/components/forms/ColorPicker/{ColorPickerContent.js → ColorPickerBody.js} +5 -5
- package/dist/components/forms/ColorPicker/index.d.ts +2 -2
- package/dist/components/forms/DatePicker/DatePicker.d.ts +7 -3
- package/dist/components/forms/DatePicker/DatePicker.js +6 -5
- package/dist/components/forms/DatePicker/DatePicker.theme.js +3 -3
- package/dist/components/forms/DatePicker/DatePicker.types.d.ts +9 -4
- package/dist/components/forms/DatePicker/DatePickerBody.d.ts +7 -0
- package/dist/components/forms/DatePicker/{DatePickerContent.js → DatePickerBody.js} +10 -9
- package/dist/components/forms/DatePicker/index.d.ts +2 -2
- package/dist/components/forms/FileUpload/FileUpload.js +0 -78
- package/dist/components/forms/Input/Input.js +2 -2
- package/dist/components/forms/Input/Input.types.d.ts +4 -4
- package/dist/components/forms/Radio/Radio.js +1 -1
- package/dist/components/forms/Radio/Radio.types.d.ts +5 -5
- package/dist/components/forms/Radio/RadioGroup.js +1 -1
- package/dist/components/forms/Select/Select.js +2 -2
- package/dist/components/forms/Select/Select.types.d.ts +4 -4
- package/dist/components/forms/Switch/Switch.js +1 -1
- package/dist/components/forms/Switch/Switch.types.d.ts +4 -4
- package/dist/components/forms/Textarea/Textarea.js +2 -2
- package/dist/components/forms/Textarea/Textarea.types.d.ts +4 -4
- package/dist/components/forms/TimePicker/TimePickerContent.js +1 -78
- package/dist/components/forms/index.d.ts +2 -2
- package/dist/components/forms/index.js +2 -80
- package/dist/components/layout/FormLayout/FormLayout.d.ts +0 -2
- package/dist/components/layout/FormLayout/FormLayout.js +12 -6
- package/dist/components/layout/FormLayout/FormLayout.theme.js +2 -5
- package/dist/components/layout/FormLayout/FormLayout.types.d.ts +8 -26
- package/dist/components/layout/FormLayout/FormLayoutSection.js +3 -2
- package/dist/components/layout/FormLayout/index.d.ts +1 -1
- package/dist/index.js +196 -198
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/components/core/Accordion/AccordionContent.d.ts +0 -3
- package/dist/components/core/Card/CardContent.d.ts +0 -3
- package/dist/components/core/Card/CardContent.js +0 -11
- package/dist/components/core/Carousel/CarouselContent.d.ts +0 -4
- package/dist/components/core/ContextMenu/ContextMenuContent.d.ts +0 -6
- package/dist/components/core/ContextMenu/ContextMenuSubContent.d.ts +0 -6
- package/dist/components/core/Drawer/DrawerContent.d.ts +0 -5
- package/dist/components/core/Drawer/DrawerContent.js +0 -11
- package/dist/components/core/Message/MessageContent.d.ts +0 -8
- package/dist/components/core/Popover/PopoverContent.d.ts +0 -7
- package/dist/components/core/Tabs/TabsContent.d.ts +0 -6
- package/dist/components/forms/ColorPicker/ColorPickerContent.d.ts +0 -7
- package/dist/components/forms/DatePicker/DatePickerContent.d.ts +0 -7
- package/dist/components/layout/FormLayout/FormLayoutBody.d.ts +0 -3
- package/dist/components/layout/FormLayout/FormLayoutBody.js +0 -91
- package/dist/components/layout/FormLayout/FormLayoutHeader.d.ts +0 -3
- package/dist/components/layout/FormLayout/FormLayoutHeader.js +0 -12
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { MessageProps } from "./Message.types";
|
|
3
3
|
export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
4
|
Avatar: React.ForwardRefExoticComponent<import("./MessageAvatar").MessageAvatarComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
|
|
5
|
+
Body: React.ForwardRefExoticComponent<import("./MessageBody").MessageBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
Actions: React.ForwardRefExoticComponent<import("./MessageActions").MessageActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
Timestamp: React.ForwardRefExoticComponent<import("./MessageTimestamp").MessageTimestampProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
List: React.ForwardRefExoticComponent<import("./MessageList.types").MessageListProps & React.RefAttributes<import("..").ScrollAreaRef>>;
|
|
@@ -9,7 +9,7 @@ import { motion } from 'motion/react';
|
|
|
9
9
|
import { DocumentDuplicateIcon, ArrowPathIcon } from '@heroicons/react/24/outline';
|
|
10
10
|
import { MessageContext } from './MessageContext.js';
|
|
11
11
|
import { MessageAvatar } from './MessageAvatar.js';
|
|
12
|
-
import {
|
|
12
|
+
import { MessageBody } from './MessageBody.js';
|
|
13
13
|
import { MessageActions } from './MessageActions.js';
|
|
14
14
|
import { MessageTimestamp } from './MessageTimestamp.js';
|
|
15
15
|
import { MessageList } from './MessageList.js';
|
|
@@ -106,7 +106,7 @@ MessageRoot.displayName = "Message";
|
|
|
106
106
|
// Attach compound components
|
|
107
107
|
const Message = Object.assign(MessageRoot, {
|
|
108
108
|
Avatar: MessageAvatar,
|
|
109
|
-
|
|
109
|
+
Body: MessageBody,
|
|
110
110
|
Actions: MessageActions,
|
|
111
111
|
Timestamp: MessageTimestamp,
|
|
112
112
|
List: MessageList,
|
|
@@ -47,7 +47,7 @@ export interface MessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
47
47
|
variant?: MessageVariant;
|
|
48
48
|
/**
|
|
49
49
|
* The message content (supports rich content, markdown, etc.)
|
|
50
|
-
* Note: Optional when using compound API with Message.
|
|
50
|
+
* Note: Optional when using compound API with Message.Body
|
|
51
51
|
*/
|
|
52
52
|
content?: ReactNode;
|
|
53
53
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MessageBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The message content
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const MessageBody: React.ForwardRefExoticComponent<MessageBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,7 +5,7 @@ import { useMessageContext } from './MessageContext.js';
|
|
|
5
5
|
import { messageTheme } from './Message.theme.js';
|
|
6
6
|
import { TypeWriter } from './TypeWriter.js';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const MessageBody = React__default.forwardRef(({ children, className, ...props }, ref) => {
|
|
9
9
|
const { variant, role, isStreaming, typingSpeed } = useMessageContext();
|
|
10
10
|
// Get variant-specific theme
|
|
11
11
|
const variantTheme = messageTheme.variants[variant];
|
|
@@ -17,6 +17,6 @@ const MessageContent = React__default.forwardRef(({ children, className, ...prop
|
|
|
17
17
|
typeof children === 'string';
|
|
18
18
|
return (jsx("div", { ref: ref, className: bubbleStyle, ...props, children: shouldAnimate ? (jsx(TypeWriter, { text: children, speed: typingSpeed, enabled: true, className: "break-words" })) : typeof children === 'string' ? (jsx("p", { className: "break-words", children: children })) : (children) }));
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
MessageBody.displayName = 'Message.Body';
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { MessageBody };
|
|
@@ -5,3 +5,5 @@ export { messageListTheme } from './MessageList.theme';
|
|
|
5
5
|
export type { MessageListProps, MessageListTheme, MessageListThemeOverrides, } from './MessageList.types';
|
|
6
6
|
export { TypeWriter } from './TypeWriter';
|
|
7
7
|
export type { TypeWriterProps } from './TypeWriter';
|
|
8
|
+
export { MessageBody } from './MessageBody';
|
|
9
|
+
export type { MessageBodyProps } from './MessageBody';
|
|
@@ -32,6 +32,9 @@ const ModalRoot = ({ isOpen, onClose, size = "md", variant = "default", closeOnO
|
|
|
32
32
|
setIsBodyScrollable(false);
|
|
33
33
|
}
|
|
34
34
|
}, [isOpen]);
|
|
35
|
+
// Detect whether size is a preset token or an arbitrary Tailwind class
|
|
36
|
+
const SIZE_TOKENS = ["sm", "md", "lg", "xl", "full"];
|
|
37
|
+
const isSizeToken = SIZE_TOKENS.includes(size);
|
|
35
38
|
// Merge theme with overrides
|
|
36
39
|
const theme = {
|
|
37
40
|
...modalTheme,
|
|
@@ -46,6 +49,7 @@ const ModalRoot = ({ isOpen, onClose, size = "md", variant = "default", closeOnO
|
|
|
46
49
|
isOpen,
|
|
47
50
|
onClose,
|
|
48
51
|
size,
|
|
52
|
+
isSizeToken,
|
|
49
53
|
closeOnOverlayClick,
|
|
50
54
|
closeOnEsc,
|
|
51
55
|
showCloseButton,
|
|
@@ -55,7 +59,7 @@ const ModalRoot = ({ isOpen, onClose, size = "md", variant = "default", closeOnO
|
|
|
55
59
|
titleId,
|
|
56
60
|
subtitleId,
|
|
57
61
|
};
|
|
58
|
-
return (jsx(Overlay, { isOpen: isOpen, onClose: onClose, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, position: "center", role: role, ariaModal: true, ariaLabelledBy: titleId, ariaDescribedBy: subtitleId, contentClassName: cn(theme.container, (_a = theme.containerVariants) === null || _a === void 0 ? void 0 : _a[variant], modalSizeVariants[size], className), animations: {
|
|
62
|
+
return (jsx(Overlay, { isOpen: isOpen, onClose: onClose, closeOnOverlayClick: closeOnOverlayClick, closeOnEsc: closeOnEsc, position: "center", role: role, ariaModal: true, ariaLabelledBy: titleId, ariaDescribedBy: subtitleId, contentClassName: cn(theme.container, (_a = theme.containerVariants) === null || _a === void 0 ? void 0 : _a[variant], isSizeToken ? modalSizeVariants[size] : size, className), animations: {
|
|
59
63
|
overlay: modalOverlayAnimations,
|
|
60
64
|
content: modalContentAnimations,
|
|
61
65
|
}, ...props, children: jsx(ModalContext.Provider, { value: contextValue, children: children }) }));
|
|
@@ -9,7 +9,7 @@ const modalTheme = {
|
|
|
9
9
|
header: "flex items-start justify-between p-6 pb-0 shrink-0 border-b border-transparent gap-6 relative",
|
|
10
10
|
headerContent: "flex flex-col items-start gap-2 flex-1",
|
|
11
11
|
title: "text-lg leading-6 font-semibold text-[var(--color-text-primary)]",
|
|
12
|
-
subtitle: "text-base text-[var(--color-text-
|
|
12
|
+
subtitle: "text-base text-[var(--color-text-muted)] mt-0.5",
|
|
13
13
|
body: "flex-1 overflow-y-auto p-6 pb-3",
|
|
14
14
|
footer: "flex items-center justify-end gap-2 p-6 py-3 border-t border-transparent",
|
|
15
15
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export type
|
|
2
|
+
export type ModalSizeToken = "sm" | "md" | "lg" | "xl" | "full";
|
|
3
|
+
/** Preset size token or any arbitrary Tailwind width class, e.g. `"w-80"`, `"w-[50vw]"` */
|
|
4
|
+
export type ModalSize = ModalSizeToken | (string & {});
|
|
3
5
|
export type ModalVariant = "default" | "translucent";
|
|
4
6
|
export interface ModalTheme {
|
|
5
7
|
overlay: string;
|
|
@@ -27,6 +29,7 @@ export interface ModalContextValue {
|
|
|
27
29
|
isOpen: boolean;
|
|
28
30
|
onClose: () => void;
|
|
29
31
|
size: ModalSize;
|
|
32
|
+
isSizeToken: boolean;
|
|
30
33
|
closeOnOverlayClick: boolean;
|
|
31
34
|
closeOnEsc: boolean;
|
|
32
35
|
showCloseButton: boolean;
|
|
@@ -56,7 +59,7 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
|
56
59
|
* - `alertdialog`: Alert dialog requiring user acknowledgment
|
|
57
60
|
* @default "dialog"
|
|
58
61
|
*/
|
|
59
|
-
role?:
|
|
62
|
+
role?: "dialog" | "alertdialog";
|
|
60
63
|
children: React.ReactNode;
|
|
61
64
|
className?: string;
|
|
62
65
|
theme?: ModalThemeOverrides;
|
|
@@ -34,6 +34,7 @@ const ModalStackModal = ({ size = "md", variant = "default", showCloseButton = t
|
|
|
34
34
|
isOpen: true,
|
|
35
35
|
onClose: closeHandler,
|
|
36
36
|
size,
|
|
37
|
+
isSizeToken: ["sm", "md", "lg", "xl", "full"].includes(size),
|
|
37
38
|
closeOnOverlayClick: true,
|
|
38
39
|
closeOnEsc: true,
|
|
39
40
|
showCloseButton,
|
|
@@ -42,7 +42,7 @@ export interface PageHeadingIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
42
42
|
}
|
|
43
43
|
export interface PageHeadingBackButtonProps {
|
|
44
44
|
/** Text label next to the back arrow. @default "Back" */
|
|
45
|
-
label?:
|
|
45
|
+
label?: ReactNode;
|
|
46
46
|
onClick?: () => void;
|
|
47
47
|
className?: string;
|
|
48
48
|
}
|
|
@@ -5,7 +5,9 @@ import { ArrowLeftIcon } from '@heroicons/react/20/solid';
|
|
|
5
5
|
import { Button } from '../Button/Button.js';
|
|
6
6
|
|
|
7
7
|
const PageHeadingBackButton = React__default.forwardRef(({ label = "Back", onClick, className, ...props }, ref) => {
|
|
8
|
-
return (jsxs(Button, { ref: ref, variant: "link", color: "neutral", size: "sm", onClick: onClick, className: cn("mb-2 w-fit", className), ...props, children: [jsx(ArrowLeftIcon, { className: "size-4" }), label
|
|
8
|
+
return (jsxs(Button, { ref: ref, variant: "link", color: "neutral", size: "sm", onClick: onClick, className: cn("mb-2 w-fit", className), ...props, children: [jsx(ArrowLeftIcon, { className: "size-4" }), typeof label === 'string'
|
|
9
|
+
? jsx("span", { children: label })
|
|
10
|
+
: label] }));
|
|
9
11
|
});
|
|
10
12
|
PageHeadingBackButton.displayName = "PageHeadingBackButton";
|
|
11
13
|
|
|
@@ -2,5 +2,5 @@ import React from "react";
|
|
|
2
2
|
import { PopoverRootProps as PopoverProps } from "./Popover.types";
|
|
3
3
|
export declare const Popover: (({ children, className, isOpen: controlledIsOpen, defaultIsOpen, onOpenChange, placement, offset, triggerType, closeOnClickOutside, closeOnEsc, preventClose, hasBackdrop, theme: themeOverrides, darkMode, ...props }: PopoverProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
4
4
|
Trigger: React.ForwardRefExoticComponent<Omit<import("./Popover.types").PopoverTriggerProps, "ref"> & React.RefAttributes<any>>;
|
|
5
|
-
|
|
5
|
+
Body: React.ForwardRefExoticComponent<import("./Popover.types").PopoverBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
};
|
|
@@ -3,7 +3,7 @@ import { useId, useState, useRef, useCallback } from 'react';
|
|
|
3
3
|
import { cn } from '../../../utils/cn.js';
|
|
4
4
|
import { PopoverContext } from './PopoverContext.js';
|
|
5
5
|
import { PopoverTrigger } from './PopoverTrigger.js';
|
|
6
|
-
import {
|
|
6
|
+
import { PopoverBody } from './PopoverBody.js';
|
|
7
7
|
import { popoverTheme } from './Popover.theme.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -16,9 +16,9 @@ import { popoverTheme } from './Popover.theme.js';
|
|
|
16
16
|
* <Popover.Trigger>
|
|
17
17
|
* <Button>Open Popover</Button>
|
|
18
18
|
* </Popover.Trigger>
|
|
19
|
-
* <Popover.
|
|
19
|
+
* <Popover.Body>
|
|
20
20
|
* <div>Popover content</div>
|
|
21
|
-
* </Popover.
|
|
21
|
+
* </Popover.Body>
|
|
22
22
|
* </Popover>
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
@@ -66,7 +66,7 @@ const PopoverRoot = ({ children, className, isOpen: controlledIsOpen, defaultIsO
|
|
|
66
66
|
// Export as a unified component
|
|
67
67
|
const Popover = Object.assign(PopoverRoot, {
|
|
68
68
|
Trigger: PopoverTrigger,
|
|
69
|
-
|
|
69
|
+
Body: PopoverBody,
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
export { Popover };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
const popoverTheme = {
|
|
5
5
|
// Base styles for the popover
|
|
6
6
|
baseStyle: "z-50 outline-none",
|
|
7
|
-
//
|
|
8
|
-
|
|
7
|
+
// Body styles
|
|
8
|
+
bodyStyle: "bg-[var(--color-surface)] border border-[var(--color-border)] rounded-[var(--popover-radius)] shadow-real-xl p-4 max-w-[min(24rem,calc(100vw-2rem))] dark:bg-[var(--color-background-secondary)] ",
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { popoverTheme };
|
|
@@ -44,7 +44,7 @@ export interface PopoverTriggerProps {
|
|
|
44
44
|
className?: string;
|
|
45
45
|
[key: string]: unknown;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface PopoverBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
48
48
|
children: ReactNode;
|
|
49
49
|
animation?: boolean;
|
|
50
50
|
portal?: boolean;
|
|
@@ -61,6 +61,6 @@ export interface PopoverContentProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
61
61
|
export interface PopoverThemeOverrides {
|
|
62
62
|
/** Base style for the popover */
|
|
63
63
|
baseStyle?: string;
|
|
64
|
-
/**
|
|
65
|
-
|
|
64
|
+
/** Body style for the popover */
|
|
65
|
+
bodyStyle?: string;
|
|
66
66
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PopoverBodyProps } from "./Popover.types";
|
|
3
|
+
/**
|
|
4
|
+
* PopoverBody component displays the body/content of the popover
|
|
5
|
+
*/
|
|
6
|
+
declare const PopoverBody: React.ForwardRefExoticComponent<PopoverBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { PopoverBody };
|
|
@@ -48,9 +48,9 @@ const useDarkMode = () => {
|
|
|
48
48
|
return isDark;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* PopoverBody component displays the body/content of the popover
|
|
52
52
|
*/
|
|
53
|
-
const
|
|
53
|
+
const PopoverBody = React__default.forwardRef(({ children, className, animation = true, portal = true, scrollable = false, maxHeight, ...props }, ref) => {
|
|
54
54
|
const { isOpen, onOpenChange, triggerRef, contentRef, placement, offset, triggerType, closeOnClickOutside, closeOnEsc, preventClose, hasBackdrop, theme, contentId, } = usePopoverContext();
|
|
55
55
|
const shouldReduceMotion = useReducedMotion();
|
|
56
56
|
const localRef = useRef(null);
|
|
@@ -111,7 +111,7 @@ const PopoverContent = React__default.forwardRef(({ children, className, animati
|
|
|
111
111
|
const isClient = useIsClient();
|
|
112
112
|
// Extract DOM props to avoid type conflicts with Framer Motion
|
|
113
113
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, onAnimationEnd, ...domProps } = props;
|
|
114
|
-
const contentClasses = cn(theme.baseStyle, theme.
|
|
114
|
+
const contentClasses = cn(theme.baseStyle, theme.bodyStyle, "popover-content", scrollable && "overflow-y-auto", className);
|
|
115
115
|
const contentPositionStyle = {
|
|
116
116
|
...cssVariables,
|
|
117
117
|
position: "fixed",
|
|
@@ -137,6 +137,6 @@ const PopoverContent = React__default.forwardRef(({ children, className, animati
|
|
|
137
137
|
}
|
|
138
138
|
return popoverContent;
|
|
139
139
|
});
|
|
140
|
-
|
|
140
|
+
PopoverBody.displayName = "Popover.Body";
|
|
141
141
|
|
|
142
|
-
export {
|
|
142
|
+
export { PopoverBody };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Popover } from './Popover';
|
|
2
2
|
import { PopoverContext, usePopoverContext } from './PopoverContext';
|
|
3
|
-
import { PopoverRootProps as PopoverProps,
|
|
4
|
-
|
|
5
|
-
export
|
|
3
|
+
import { PopoverRootProps as PopoverProps, PopoverBodyProps, PopoverTriggerProps, PopoverContextValue, PopoverPlacement, PopoverTriggerType, PopoverThemeOverrides } from './Popover.types';
|
|
4
|
+
import { PopoverBody } from './PopoverBody';
|
|
5
|
+
export { Popover, PopoverBody, PopoverContext, usePopoverContext };
|
|
6
|
+
export type { PopoverProps, PopoverBodyProps, PopoverTriggerProps, PopoverContextValue, PopoverPlacement, PopoverTriggerType, PopoverThemeOverrides };
|
|
@@ -17,7 +17,7 @@ export interface UnderlinePosition {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const getUnderlineTransition: (shouldReduceMotion: boolean | null) => Transition;
|
|
19
19
|
/**
|
|
20
|
-
* Get
|
|
20
|
+
* Get TabsBody animation variants for directional fade animations
|
|
21
21
|
* Provides smooth fade-in from bottom and fade-out to top transitions
|
|
22
22
|
*/
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const getTabsBodyVariants: (shouldReduceMotion: boolean | null) => Variants | undefined;
|
|
@@ -45,10 +45,10 @@ const getUnderlineTransition = (shouldReduceMotion) => {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
* Get
|
|
48
|
+
* Get TabsBody animation variants for directional fade animations
|
|
49
49
|
* Provides smooth fade-in from bottom and fade-out to top transitions
|
|
50
50
|
*/
|
|
51
|
-
const
|
|
51
|
+
const getTabsBodyVariants = (shouldReduceMotion) => {
|
|
52
52
|
if (shouldReduceMotion !== null && shouldReduceMotion !== void 0 ? shouldReduceMotion : false) {
|
|
53
53
|
// Reduced motion: no animation variants
|
|
54
54
|
return undefined;
|
|
@@ -81,4 +81,4 @@ const getTabsContentVariants = (shouldReduceMotion) => {
|
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
export {
|
|
84
|
+
export { getTabsBodyVariants, getTabsTriggerVariants, getUnderlineTransition };
|
|
@@ -3,5 +3,5 @@ import { TabsProps } from "./Tabs.types";
|
|
|
3
3
|
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>> & {
|
|
4
4
|
List: React.ForwardRefExoticComponent<import("./Tabs.types").TabsListProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
Trigger: React.ForwardRefExoticComponent<import("./Tabs.types").TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
|
|
6
|
+
Body: React.ForwardRefExoticComponent<import("./Tabs.types").TabsBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
};
|
|
@@ -5,11 +5,11 @@ import { tabsTheme } from './Tabs.theme.js';
|
|
|
5
5
|
import { TabsContext } from './TabsContext.js';
|
|
6
6
|
import { TabsList } from './TabsList.js';
|
|
7
7
|
import { TabsTrigger } from './TabsTrigger.js';
|
|
8
|
-
import {
|
|
8
|
+
import { TabsBody } from './TabsBody.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Tabs component for organizing content into separate views
|
|
12
|
-
* Uses compound component pattern with Tabs.List, Tabs.Trigger, and Tabs.
|
|
12
|
+
* Uses compound component pattern with Tabs.List, Tabs.Trigger, and Tabs.Body
|
|
13
13
|
* Supports optional Framer Motion animations and comprehensive accessibility
|
|
14
14
|
*/
|
|
15
15
|
const TabsComponent = React__default.forwardRef(({ value, defaultValue, onValueChange, orientation = "horizontal", size = "md", disabled = false, children, className, darkMode = false, ...props }, ref) => {
|
|
@@ -84,7 +84,7 @@ TabsComponent.displayName = "Tabs";
|
|
|
84
84
|
const Tabs = Object.assign(TabsComponent, {
|
|
85
85
|
List: TabsList,
|
|
86
86
|
Trigger: TabsTrigger,
|
|
87
|
-
|
|
87
|
+
Body: TabsBody,
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
export { Tabs };
|
|
@@ -13,8 +13,8 @@ const tabsTheme = {
|
|
|
13
13
|
sm: "px-2 py-1.5 text-base gap-1",
|
|
14
14
|
md: "px-2 py-2 text-base gap-1",
|
|
15
15
|
},
|
|
16
|
-
//
|
|
17
|
-
|
|
16
|
+
// TabsBody styles with proper CSS variables
|
|
17
|
+
bodyStyle: "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)] focus-visible:ring-offset-2",
|
|
18
18
|
// Sliding underline styles
|
|
19
19
|
underlineStyle: "absolute bottom-0 h-0.5 bg-[var(--color-primary)] transition-none",
|
|
20
20
|
};
|
|
@@ -23,8 +23,8 @@ export type TabsOrientation = "horizontal";
|
|
|
23
23
|
* <Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
|
|
24
24
|
* <Tabs.Trigger value="tab2">Tab 2</Tabs.Trigger>
|
|
25
25
|
* </Tabs.List>
|
|
26
|
-
* <Tabs.
|
|
27
|
-
* <Tabs.
|
|
26
|
+
* <Tabs.Body value="tab1">Content 1</Tabs.Body>
|
|
27
|
+
* <Tabs.Body value="tab2">Content 2</Tabs.Body>
|
|
28
28
|
* </Tabs>
|
|
29
29
|
*
|
|
30
30
|
* // Uncontrolled mode
|
|
@@ -46,7 +46,7 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
46
46
|
size?: TabsSize;
|
|
47
47
|
/** Whether all tabs are disabled - individual triggers can also be disabled */
|
|
48
48
|
disabled?: boolean;
|
|
49
|
-
/** Children components - typically Tabs.List and Tabs.
|
|
49
|
+
/** Children components - typically Tabs.List and Tabs.Body components */
|
|
50
50
|
children?: React.ReactNode;
|
|
51
51
|
/**
|
|
52
52
|
* Force dark mode styling for the component. Use when placing the component
|
|
@@ -98,20 +98,20 @@ export interface TabsTriggerProps extends React.HTMLAttributes<HTMLButtonElement
|
|
|
98
98
|
'aria-label'?: string;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* TabsBody component props - content panel for each tab
|
|
102
102
|
* @example
|
|
103
103
|
* ```tsx
|
|
104
|
-
* <Tabs.
|
|
104
|
+
* <Tabs.Body value="profile">
|
|
105
105
|
* <UserProfile data={profileData} />
|
|
106
|
-
* </Tabs.
|
|
106
|
+
* </Tabs.Body>
|
|
107
107
|
*
|
|
108
108
|
* // Force mount content for performance or state preservation
|
|
109
|
-
* <Tabs.
|
|
109
|
+
* <Tabs.Body value="settings" forceMount>
|
|
110
110
|
* <SettingsForm /> // Form state preserved when tab is inactive
|
|
111
|
-
* </Tabs.
|
|
111
|
+
* </Tabs.Body>
|
|
112
112
|
* ```
|
|
113
113
|
*/
|
|
114
|
-
export interface
|
|
114
|
+
export interface TabsBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
115
115
|
/** The value that corresponds to a TabsTrigger value - determines when content is shown */
|
|
116
116
|
value: string;
|
|
117
117
|
/** Whether to keep content mounted in DOM when inactive (useful for preserving form state) */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TabsBodyProps } from "./Tabs.types";
|
|
3
|
+
/**
|
|
4
|
+
* TabsBody component displays content panels for tabs with directional fade animations
|
|
5
|
+
*/
|
|
6
|
+
export declare const TabsBody: React.ForwardRefExoticComponent<TabsBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,12 +4,12 @@ import { useReducedMotion, motion, AnimatePresence } from 'motion/react';
|
|
|
4
4
|
import { cn } from '../../../utils/cn.js';
|
|
5
5
|
import { tabsTheme } from './Tabs.theme.js';
|
|
6
6
|
import { useTabsContext } from './TabsContext.js';
|
|
7
|
-
import {
|
|
7
|
+
import { getTabsBodyVariants } from './Tabs.animations.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* TabsBody component displays content panels for tabs with directional fade animations
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const TabsBody = React__default.forwardRef(({ value, forceMount = false, children, className, ...props }, ref) => {
|
|
13
13
|
const { value: selectedValue, orientation } = useTabsContext();
|
|
14
14
|
const shouldReduceMotion = useReducedMotion();
|
|
15
15
|
// Check if we're in Storybook and should disable animations
|
|
@@ -18,10 +18,10 @@ const TabsContent = React__default.forwardRef(({ value, forceMount = false, chil
|
|
|
18
18
|
const isSelected = value === selectedValue;
|
|
19
19
|
const shouldRender = forceMount || isSelected;
|
|
20
20
|
// Compute animation variants without a global cache (HMR-safe)
|
|
21
|
-
const contentVariants = useMemo(() =>
|
|
21
|
+
const contentVariants = useMemo(() => getTabsBodyVariants(shouldDisableAnimations), [shouldDisableAnimations]);
|
|
22
22
|
// For forceMount, we handle visibility differently to preserve DOM
|
|
23
23
|
if (forceMount) {
|
|
24
|
-
return (jsx(motion.div, { ref: ref, role: "tabpanel", "aria-labelledby": `${value}-tab`, id: `${value}-content`, tabIndex: 0, className: cn(tabsTheme.
|
|
24
|
+
return (jsx(motion.div, { ref: ref, role: "tabpanel", "aria-labelledby": `${value}-tab`, id: `${value}-content`, tabIndex: 0, className: cn(tabsTheme.bodyStyle, !isSelected && "hidden", // Hide when not selected but force mounted
|
|
25
25
|
className // User overrides take precedence
|
|
26
26
|
), "data-state": isSelected ? "active" : "inactive", "data-orientation": orientation, style: {
|
|
27
27
|
// Ensure proper stacking context for animations
|
|
@@ -39,12 +39,12 @@ const TabsContent = React__default.forwardRef(({ value, forceMount = false, chil
|
|
|
39
39
|
exit: "exit",
|
|
40
40
|
variants: contentVariants,
|
|
41
41
|
};
|
|
42
|
-
return (jsx(AnimatePresence, { mode: "wait", children: isSelected && (jsx(motion.div, { ref: ref, role: "tabpanel", "aria-labelledby": `${value}-tab`, id: `${value}-content`, tabIndex: 0, className: cn(tabsTheme.
|
|
42
|
+
return (jsx(AnimatePresence, { mode: "wait", children: isSelected && (jsx(motion.div, { ref: ref, role: "tabpanel", "aria-labelledby": `${value}-tab`, id: `${value}-content`, tabIndex: 0, className: cn(tabsTheme.bodyStyle, className // User overrides take precedence
|
|
43
43
|
), "data-state": "active", "data-orientation": orientation, style: {
|
|
44
44
|
// Ensure proper stacking context for animations
|
|
45
45
|
position: "relative",
|
|
46
46
|
}, ...animationProps, ...props, children: children }, `content-${value}`)) }));
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
TabsBody.displayName = "Tabs.Body";
|
|
49
49
|
|
|
50
|
-
export {
|
|
50
|
+
export { TabsBody };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Tabs } from './Tabs';
|
|
2
2
|
export { TabsList } from './TabsList';
|
|
3
3
|
export { TabsTrigger } from './TabsTrigger';
|
|
4
|
-
export {
|
|
4
|
+
export { TabsBody } from './TabsBody';
|
|
5
5
|
export { TabsContext, useTabsContext } from './TabsContext';
|
|
6
|
-
export type { TabsProps, TabsListProps, TabsTriggerProps,
|
|
6
|
+
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsBodyProps, TabsSize, TabsOrientation, TabsContextValue } from './Tabs.types';
|
|
@@ -73,7 +73,11 @@ onDismiss, index = 0, isExpanded = false, totalToasts = 1, onMouseEnter, onMouse
|
|
|
73
73
|
}, [stackingStyle.zIndex, index]);
|
|
74
74
|
const toastNode = (jsxs(motion.div, { ref: setRefs, layout: true, initial: shouldReduceMotion ? false : toastAnimations.initial, animate: animateValue, exit: shouldReduceMotion
|
|
75
75
|
? { ...toastAnimations.exit, transition: { duration: 0 } }
|
|
76
|
-
: toastAnimations.exit, transition: shouldReduceMotion ? { duration: 0 } : toastAnimations.transition, className: cn(toastTheme.baseStyle, isTextOnly && 'items-center', ((_a = toastTheme.variants) === null || _a === void 0 ? void 0 : _a[variant]) || "", 'pointer-events-auto', index > 0 && !isExpanded && 'absolute top-0 left-0', className), style: styleValue, role: "alert", "aria-live": "polite", children: [jsx("div", { className: isTextOnly ? toastTheme.iconCenteredStyle : toastTheme.iconStyle, children: resolvedIcon }), jsxs("div", { className: "flex-1 min-w-0", children: [title && (
|
|
76
|
+
: toastAnimations.exit, transition: shouldReduceMotion ? { duration: 0 } : toastAnimations.transition, className: cn(toastTheme.baseStyle, isTextOnly && 'items-center', ((_a = toastTheme.variants) === null || _a === void 0 ? void 0 : _a[variant]) || "", 'pointer-events-auto', index > 0 && !isExpanded && 'absolute top-0 left-0', className), style: styleValue, role: "alert", "aria-live": "polite", children: [jsx("div", { className: isTextOnly ? toastTheme.iconCenteredStyle : toastTheme.iconStyle, children: resolvedIcon }), jsxs("div", { className: "flex-1 min-w-0", children: [title && (typeof title === 'string'
|
|
77
|
+
? jsx("div", { className: isTextOnly ? toastTheme.textOnlyStyle : toastTheme.titleStyle, children: title })
|
|
78
|
+
: title), subtitle && (typeof subtitle === 'string'
|
|
79
|
+
? jsx("div", { className: toastTheme.subtitleStyle, children: subtitle })
|
|
80
|
+
: subtitle), action && (jsx("div", { className: "mt-2", children: jsx("button", { type: "button", className: toastTheme.actionStyle, onClick: handleActionClick, children: action.label }) }))] }), dismissible && (jsx("button", { type: "button", className: isTextOnly ? toastTheme.closeButtonCenteredStyle : toastTheme.closeButtonStyle, onClick: handleDismiss, "aria-label": "Dismiss notification", children: jsx(XMarkIcon, { className: "w-4 h-4" }) }))] }));
|
|
77
81
|
if (darkMode) {
|
|
78
82
|
return jsx("div", { className: "dark", children: toastNode });
|
|
79
83
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from
|
|
1
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Toast visual variant
|
|
4
4
|
*/
|
|
5
|
-
export type ToastVariant =
|
|
5
|
+
export type ToastVariant = "default" | "glass";
|
|
6
6
|
/**
|
|
7
7
|
* Toast state (e.g., loading indicator)
|
|
8
8
|
*/
|
|
9
|
-
export type ToastState =
|
|
10
|
-
export type ToastPosition =
|
|
9
|
+
export type ToastState = "default" | "loading";
|
|
10
|
+
export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
11
11
|
export interface ToastAction {
|
|
12
12
|
label: string;
|
|
13
13
|
onClick: () => void;
|
|
@@ -42,15 +42,15 @@ export interface ToastData {
|
|
|
42
42
|
id: string;
|
|
43
43
|
variant?: ToastVariant;
|
|
44
44
|
state?: ToastState;
|
|
45
|
-
title?:
|
|
46
|
-
subtitle?:
|
|
45
|
+
title?: ReactNode;
|
|
46
|
+
subtitle?: ReactNode;
|
|
47
47
|
icon?: ReactNode;
|
|
48
48
|
action?: ToastAction;
|
|
49
49
|
duration?: number;
|
|
50
50
|
dismissible?: boolean;
|
|
51
51
|
onDismiss?: () => void;
|
|
52
52
|
}
|
|
53
|
-
export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
53
|
+
export interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
54
54
|
/** Toast data */
|
|
55
55
|
toast: ToastData;
|
|
56
56
|
/** Custom class name */
|
|
@@ -93,7 +93,7 @@ export interface ToastProviderProps {
|
|
|
93
93
|
}
|
|
94
94
|
export interface ToastContextValue {
|
|
95
95
|
toasts: ToastData[];
|
|
96
|
-
addToast: (toast: Omit<ToastData,
|
|
96
|
+
addToast: (toast: Omit<ToastData, "id">) => string;
|
|
97
97
|
removeToast: (id: string) => void;
|
|
98
98
|
removeAllToasts: () => void;
|
|
99
99
|
}
|
|
@@ -121,7 +121,7 @@ export interface UseToastReturn {
|
|
|
121
121
|
info: (title: string, options?: UseToastOptions & {
|
|
122
122
|
subtitle?: string;
|
|
123
123
|
}) => string;
|
|
124
|
-
loading: (title: string, options?: Omit<UseToastOptions,
|
|
124
|
+
loading: (title: string, options?: Omit<UseToastOptions, "state"> & {
|
|
125
125
|
subtitle?: string;
|
|
126
126
|
}) => string;
|
|
127
127
|
dismiss: (id: string) => void;
|
|
@@ -18,11 +18,13 @@ export { CalendarMini } from './Calendar/CalendarMini/CalendarMini.js';
|
|
|
18
18
|
export { Card } from './Card/Card.js';
|
|
19
19
|
export { CardStack } from './CardStack/CardStack.js';
|
|
20
20
|
export { Carousel } from './Carousel/Carousel.js';
|
|
21
|
+
export { CarouselBody } from './Carousel/CarouselBody.js';
|
|
21
22
|
export { CommandPalette } from './CommandPalette/CommandPalette.js';
|
|
22
23
|
export { commandPaletteTheme } from './CommandPalette/CommandPalette.theme.js';
|
|
23
24
|
export { Separator } from './Separator/Separator.js';
|
|
24
25
|
export { separatorTheme } from './Separator/Separator.theme.js';
|
|
25
26
|
export { Drawer } from './Drawer/Drawer.js';
|
|
27
|
+
export { DrawerBody } from './Drawer/DrawerBody.js';
|
|
26
28
|
export { Dropdown } from './Dropdown/Dropdown.js';
|
|
27
29
|
export { DropdownTrigger } from './Dropdown/DropdownTrigger.js';
|
|
28
30
|
export { DropdownMenu } from './Dropdown/DropdownMenu.js';
|
|
@@ -41,6 +43,7 @@ export { PageHeading } from './PageHeading/PageHeading.js';
|
|
|
41
43
|
export { Pagination } from './Pagination/Pagination.js';
|
|
42
44
|
export { Popover } from './Popover/Popover.js';
|
|
43
45
|
export { PopoverContext, usePopoverContext } from './Popover/PopoverContext.js';
|
|
46
|
+
export { PopoverBody } from './Popover/PopoverBody.js';
|
|
44
47
|
export { Progress } from './Progress/Progress.js';
|
|
45
48
|
export { Rating } from './Rating/Rating.js';
|
|
46
49
|
export { ScrollArea } from './ScrollArea/ScrollArea.js';
|
|
@@ -52,7 +55,7 @@ export { SlidingNumber } from './SlidingNumber/SlidingNumber.js';
|
|
|
52
55
|
export { Tabs } from './Tabs/Tabs.js';
|
|
53
56
|
export { TabsList } from './Tabs/TabsList.js';
|
|
54
57
|
export { TabsTrigger } from './Tabs/TabsTrigger.js';
|
|
55
|
-
export {
|
|
58
|
+
export { TabsBody } from './Tabs/TabsBody.js';
|
|
56
59
|
export { TabsContext, useTabsContext } from './Tabs/TabsContext.js';
|
|
57
60
|
export { Tooltip } from './Tooltip/Tooltip.js';
|
|
58
61
|
export { baseTooltipVariants, getTooltipVariants, tooltipSpringConfig } from './Tooltip/Tooltip.animations.js';
|
|
@@ -71,6 +74,7 @@ export { Message } from './Message/Message.js';
|
|
|
71
74
|
export { messageTheme } from './Message/Message.theme.js';
|
|
72
75
|
export { messageListTheme } from './Message/MessageList.theme.js';
|
|
73
76
|
export { TypeWriter } from './Message/TypeWriter.js';
|
|
77
|
+
export { MessageBody } from './Message/MessageBody.js';
|
|
74
78
|
export { Empty } from './Empty/Empty.js';
|
|
75
79
|
export { emptyTheme } from './Empty/Empty.theme.js';
|
|
76
80
|
export { Masonry } from './Masonry/Masonry.js';
|
|
@@ -95,7 +99,7 @@ export { Pill } from './Pill/Pill.js';
|
|
|
95
99
|
export { pillTheme } from './Pill/Pill.theme.js';
|
|
96
100
|
export { SocialIcon } from './SocialIcon/SocialIcon.js';
|
|
97
101
|
export { AnimatePresence } from 'motion/react';
|
|
98
|
-
export {
|
|
102
|
+
export { CardBody } from './Card/CardBody.js';
|
|
99
103
|
export { CardFooter } from './Card/CardFooter.js';
|
|
100
104
|
export { CardHeader } from './Card/CardHeader.js';
|
|
101
105
|
export { CardSubtitle } from './Card/CardSubtitle.js';
|