@moondreamsdev/dreamer-ui 1.7.7-test.4 → 1.7.7-test.5
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/{Toast-CwaBr4ht.cjs → Toast-B4zUICg8.cjs} +2 -2
- package/dist/{Toast-CwaBr4ht.cjs.map → Toast-B4zUICg8.cjs.map} +1 -1
- package/dist/{Toast-CKF3_Xwk.js → Toast-C84BREWE.js} +23 -23
- package/dist/{Toast-CKF3_Xwk.js.map → Toast-C84BREWE.js.map} +1 -1
- package/dist/components.cjs.js +1 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +709 -566
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/panel/Panel.d.ts +36 -0
- package/dist/src/components/panel/hooks.d.ts +6 -0
- package/dist/src/components/panel/index.d.ts +3 -0
- package/dist/src/components/panel/variants.d.ts +12 -0
- package/dist/theme.css +1 -0
- package/package.json +1 -1
package/dist/providers.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useCallback as s } from "react";
|
|
3
|
-
import { A as v, T as y } from "./Toast-
|
|
3
|
+
import { A as v, T as y } from "./Toast-C84BREWE.js";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import { A as b, T as C } from "./useToast-CEKvEJVB.js";
|
|
6
6
|
import { join as w } from "./utils.esm.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PanelSize } from './variants';
|
|
3
|
+
export interface PanelProps {
|
|
4
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
5
|
+
/** Unique identifier for the panel */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Whether the panel is open */
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
/** Callback when panel should close */
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
/** Panel title - can be a string or React node */
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
/** Panel content */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/** Panel footer - can be a string or React node */
|
|
16
|
+
footer?: React.ReactNode;
|
|
17
|
+
/** Panel size variant */
|
|
18
|
+
size?: PanelSize;
|
|
19
|
+
/** Additional CSS classes for the panel */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Additional CSS classes for the overlay */
|
|
22
|
+
overlayClassName?: string;
|
|
23
|
+
/** Whether to hide the close button */
|
|
24
|
+
hideCloseButton?: boolean;
|
|
25
|
+
/** Whether to disable closing when clicking the overlay */
|
|
26
|
+
disableCloseOnOverlayClick?: boolean;
|
|
27
|
+
/** ARIA labelledby attribute */
|
|
28
|
+
ariaLabelledBy?: string;
|
|
29
|
+
/** ARIA describedby attribute */
|
|
30
|
+
ariaDescribedBy?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Panel component that slides in from the right side of the screen.
|
|
34
|
+
* Provides an overlay and slide-in animation for side content display.
|
|
35
|
+
*/
|
|
36
|
+
export default function Panel({ ref, id, isOpen, onClose, title, children, footer, size, className, overlayClassName, hideCloseButton, disableCloseOnOverlayClick, ariaLabelledBy, ariaDescribedBy, }: PanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function useAnimationSlideIn(isOpen: boolean): {
|
|
2
|
+
show: boolean;
|
|
3
|
+
shouldRender: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare function usePanelDocumentChanges(isOpen: boolean, onClose: () => void): void;
|
|
6
|
+
export declare function usePanelFocus(panelId: string, isOpen: boolean): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const panelVariants: {
|
|
2
|
+
readonly size: {
|
|
3
|
+
readonly sm: "max-w-sm";
|
|
4
|
+
readonly md: "max-w-md";
|
|
5
|
+
readonly lg: "max-w-lg";
|
|
6
|
+
readonly xl: "max-w-xl";
|
|
7
|
+
readonly '2xl': "max-w-2xl";
|
|
8
|
+
readonly full: "w-full";
|
|
9
|
+
readonly screen: "w-screen";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type PanelSize = keyof typeof panelVariants.size;
|
package/dist/theme.css
CHANGED