ownui-system 0.0.2 → 0.0.4
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/README.md +64 -1
- package/package.json +2 -2
- package/dist/App.d.ts +0 -2
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -23
- package/dist/components/Accordion/accordion-body.d.ts +0 -6
- package/dist/components/Accordion/accordion-context.d.ts +0 -16
- package/dist/components/Accordion/accordion-header.d.ts +0 -9
- package/dist/components/Accordion/accordion-item.d.ts +0 -11
- package/dist/components/Accordion/accordion-style.d.ts +0 -10
- package/dist/components/Accordion/accordion.d.ts +0 -12
- package/dist/components/Accordion/accortion-transition.d.ts +0 -24
- package/dist/components/Accordion/index.d.ts +0 -2
- package/dist/components/Badge/Badge.stories.d.ts +0 -14
- package/dist/components/Badge/Badge.style.d.ts +0 -26
- package/dist/components/Badge/badge-transition.d.ts +0 -18
- package/dist/components/Badge/index.d.ts +0 -13
- package/dist/components/BottomSheet/bottomsheet-body.d.ts +0 -7
- package/dist/components/BottomSheet/bottomsheet-contents.d.ts +0 -3
- package/dist/components/BottomSheet/bottomsheet-context.d.ts +0 -14
- package/dist/components/BottomSheet/bottomsheet-header.d.ts +0 -3
- package/dist/components/BottomSheet/bottomsheet-transition.d.ts +0 -23
- package/dist/components/BottomSheet/bottomsheet.d.ts +0 -14
- package/dist/components/BottomSheet/index.d.ts +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -43
- package/dist/components/Button/Button.style.d.ts +0 -40
- package/dist/components/Button/index.d.ts +0 -12
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -30
- package/dist/components/Checkbox/Checkbox.style.d.ts +0 -28
- package/dist/components/Checkbox/CheckboxIcon.d.ts +0 -6
- package/dist/components/Checkbox/index.d.ts +0 -17
- package/dist/components/Dimmed/Dimmed.style.d.ts +0 -3
- package/dist/components/Dimmed/index.d.ts +0 -10
- package/dist/components/Divider/Divider.stories.d.ts +0 -19
- package/dist/components/Divider/index.d.ts +0 -8
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -36
- package/dist/components/Drawer/DrawerStyle.d.ts +0 -7
- package/dist/components/Drawer/drawer-content.d.ts +0 -8
- package/dist/components/Drawer/drawer-context.d.ts +0 -19
- package/dist/components/Drawer/drawer-transition.d.ts +0 -64
- package/dist/components/Drawer/drawer.d.ts +0 -14
- package/dist/components/Drawer/hook/useDrawer.d.ts +0 -20
- package/dist/components/Drawer/index.d.ts +0 -2
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -12
- package/dist/components/Dropdown/dropdown-body.d.ts +0 -7
- package/dist/components/Dropdown/dropdown-content.d.ts +0 -6
- package/dist/components/Dropdown/dropdown-context.d.ts +0 -15
- package/dist/components/Dropdown/dropdown-item.d.ts +0 -9
- package/dist/components/Dropdown/dropdown-transition.d.ts +0 -20
- package/dist/components/Dropdown/dropdown-trigger.d.ts +0 -6
- package/dist/components/Dropdown/dropdown.d.ts +0 -10
- package/dist/components/Dropdown/hook/useDropdown.d.ts +0 -17
- package/dist/components/Dropdown/index.d.ts +0 -3
- package/dist/components/Input/Input.stories.d.ts +0 -37
- package/dist/components/Input/Input.style.d.ts +0 -7
- package/dist/components/Input/index.d.ts +0 -9
- package/dist/components/Modal/Modal.stories.d.ts +0 -12
- package/dist/components/Modal/hook/useModal.d.ts +0 -24
- package/dist/components/Modal/index.d.ts +0 -5
- package/dist/components/Modal/modal-body.d.ts +0 -6
- package/dist/components/Modal/modal-content.d.ts +0 -8
- package/dist/components/Modal/modal-context.d.ts +0 -22
- package/dist/components/Modal/modal-footer.d.ts +0 -6
- package/dist/components/Modal/modal-header.d.ts +0 -6
- package/dist/components/Modal/modal-transition.d.ts +0 -46
- package/dist/components/Modal/modal.d.ts +0 -19
- package/dist/components/Popover/Popover.stories.d.ts +0 -32
- package/dist/components/Popover/hook/usePopover.d.ts +0 -38
- package/dist/components/Popover/index.d.ts +0 -3
- package/dist/components/Popover/popover-content.d.ts +0 -6
- package/dist/components/Popover/popover-context.d.ts +0 -20
- package/dist/components/Popover/popover-transition.d.ts +0 -20
- package/dist/components/Popover/popover-trigger.d.ts +0 -3
- package/dist/components/Popover/popover.d.ts +0 -29
- package/dist/components/Skeleton/index.d.ts +0 -10
- package/dist/components/Tab/Tab.stories.d.ts +0 -16
- package/dist/components/Tab/Tab.style.d.ts +0 -29
- package/dist/components/Tab/index.d.ts +0 -9
- package/dist/components/Tab/tab-context.d.ts +0 -13
- package/dist/components/Tab/tab-group.d.ts +0 -9
- package/dist/components/Text/index.d.ts +0 -10
- package/dist/components/TextArea/TextArea.stories.d.ts +0 -33
- package/dist/components/TextArea/TextArea.style.d.ts +0 -6
- package/dist/components/TextArea/index.d.ts +0 -10
- package/dist/components/TextField/TextField.stories.d.ts +0 -30
- package/dist/components/TextField/index.d.ts +0 -10
- package/dist/components/index.d.ts +0 -18
- package/dist/components/shared/Flex.d.ts +0 -13
- package/dist/components/shared/Portal.d.ts +0 -9
- package/dist/components/shared/Spacing.d.ts +0 -6
- package/dist/hooks/index.d.ts +0 -4
- package/dist/hooks/useClickOutSideEffect.d.ts +0 -3
- package/dist/hooks/useDomRef.d.ts +0 -4
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -7
- package/dist/hooks/useMounted.d.ts +0 -2
- package/dist/index.d.ts +0 -5
- package/dist/main.d.ts +0 -0
- package/dist/ownui-system.js +0 -6678
- package/dist/ownui-system.js.map +0 -1
- package/dist/ownui-system.umd.cjs +0 -36
- package/dist/ownui-system.umd.cjs.map +0 -1
- package/dist/styles/colors.d.ts +0 -38
- package/dist/styles/typography.d.ts +0 -173
- package/dist/types/index.d.ts +0 -6
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import Drawer from "./drawer";
|
|
4
|
-
type DrawerProps = ComponentProps<typeof Drawer>;
|
|
5
|
-
type DrawerContextValue = {
|
|
6
|
-
isOpen: DrawerProps["isOpen"];
|
|
7
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
8
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
9
|
-
zIndex?: number;
|
|
10
|
-
drawerId: string;
|
|
11
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
12
|
-
};
|
|
13
|
-
declare function useContext(): DrawerContextValue;
|
|
14
|
-
export declare function useDrawerContext(): {
|
|
15
|
-
DrawerProvider: import("react").Provider<DrawerContextValue | undefined>;
|
|
16
|
-
useContext: typeof useContext;
|
|
17
|
-
Context: import("react").Context<DrawerContextValue | undefined>;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export declare const SlideInOutFromTop: {
|
|
2
|
-
enter: {
|
|
3
|
-
y: number;
|
|
4
|
-
transition: {
|
|
5
|
-
duration: number;
|
|
6
|
-
ease: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
exit: {
|
|
10
|
-
y: string;
|
|
11
|
-
transition: {
|
|
12
|
-
duration: number;
|
|
13
|
-
ease: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare const SlideInOutFromBottom: {
|
|
18
|
-
enter: {
|
|
19
|
-
y: number;
|
|
20
|
-
transition: {
|
|
21
|
-
duration: number;
|
|
22
|
-
ease: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
exit: {
|
|
26
|
-
y: string;
|
|
27
|
-
transition: {
|
|
28
|
-
duration: number;
|
|
29
|
-
ease: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export declare const SlideInOutFromLeft: {
|
|
34
|
-
enter: {
|
|
35
|
-
x: number;
|
|
36
|
-
transition: {
|
|
37
|
-
duration: number;
|
|
38
|
-
ease: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
exit: {
|
|
42
|
-
x: string;
|
|
43
|
-
transition: {
|
|
44
|
-
duration: number;
|
|
45
|
-
ease: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export declare const SlideInOutFromRight: {
|
|
50
|
-
enter: {
|
|
51
|
-
x: number;
|
|
52
|
-
transition: {
|
|
53
|
-
duration: number;
|
|
54
|
-
ease: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
exit: {
|
|
58
|
-
x: string;
|
|
59
|
-
transition: {
|
|
60
|
-
duration: number;
|
|
61
|
-
ease: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
3
|
-
export type DrawerProps = {
|
|
4
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
8
|
-
zIndex?: number;
|
|
9
|
-
drawerId?: string;
|
|
10
|
-
allowCloseOnClickBackDrop?: boolean;
|
|
11
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
12
|
-
};
|
|
13
|
-
declare function Drawer({ children, motionVariant, allowCloseOnClickBackDrop, zIndex, placement, drawerId, ...restProps }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export default Drawer;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
type UseDrawerProps = {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
5
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
6
|
-
zIndex?: number;
|
|
7
|
-
drawerId: string;
|
|
8
|
-
onOpen?: () => void;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
11
|
-
};
|
|
12
|
-
declare function useDrawer({ isOpen, placement, motionVariant, zIndex, drawerId, onOpen, onClose, onOpenChange, }: UseDrawerProps): {
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
placement: "bottom" | "left" | "right" | "top" | undefined;
|
|
15
|
-
motionVariant: import("framer-motion").Variants | undefined;
|
|
16
|
-
zIndex: number | undefined;
|
|
17
|
-
drawerId: string;
|
|
18
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
19
|
-
};
|
|
20
|
-
export default useDrawer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
import Dropdown from "./dropdown";
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Dropdown;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type DropdownContextValue = {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
selectedItem?: string;
|
|
5
|
-
color?: string;
|
|
6
|
-
onSelect: (name: string) => void;
|
|
7
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
8
|
-
};
|
|
9
|
-
declare function useContext(): DropdownContextValue;
|
|
10
|
-
export declare function useDropdownContext(): {
|
|
11
|
-
DropdownProvider: import("react").Provider<DropdownContextValue | undefined>;
|
|
12
|
-
useContext: typeof useContext;
|
|
13
|
-
Context: import("react").Context<DropdownContextValue | undefined>;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type DropdownItemProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
value: string;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare function DropdownItem({ children, value, className, disabled, }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default DropdownItem;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const scaleInOut: {
|
|
2
|
-
enter: {
|
|
3
|
-
opacity: number;
|
|
4
|
-
scale: number;
|
|
5
|
-
transition: {
|
|
6
|
-
opacity: {
|
|
7
|
-
duration: number;
|
|
8
|
-
ease: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exit: {
|
|
13
|
-
opacity: number;
|
|
14
|
-
scale: number;
|
|
15
|
-
transition: {
|
|
16
|
-
duration: number;
|
|
17
|
-
ease: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface DropdownProps {
|
|
3
|
-
selectedItem: string;
|
|
4
|
-
trigger: React.ReactNode;
|
|
5
|
-
content?: React.ReactNode;
|
|
6
|
-
color?: string;
|
|
7
|
-
onSelect: (name: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare function Dropdown({ trigger, content, selectedItem, color, onSelect, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default Dropdown;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type UseDropdownProps = {
|
|
2
|
-
isOpen: boolean;
|
|
3
|
-
selectedItem: string;
|
|
4
|
-
color?: string;
|
|
5
|
-
onSelect: (name: string) => void;
|
|
6
|
-
onOpen?: () => void;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
declare function useDropdown({ isOpen, selectedItem, color, onOpen, onClose, onSelect, onOpenChange, }: UseDropdownProps): {
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
selectedItem: string;
|
|
13
|
-
color: string | undefined;
|
|
14
|
-
onSelect: (name: string) => void;
|
|
15
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
16
|
-
};
|
|
17
|
-
export default useDropdown;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
import Input from '.';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Input;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
inValid: {
|
|
11
|
-
control: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
disabled: {
|
|
16
|
-
control: {
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
left: {
|
|
21
|
-
if: {
|
|
22
|
-
arg: string;
|
|
23
|
-
exists: true;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
right: {
|
|
27
|
-
if: {
|
|
28
|
-
arg: string;
|
|
29
|
-
exists: true;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
tags: string[];
|
|
34
|
-
};
|
|
35
|
-
export default meta;
|
|
36
|
-
type Story = StoryObj<typeof meta>;
|
|
37
|
-
export declare const Default: Story;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const baseStyle = "rounded-[10px] border-solid border-[1px] border-[#ebebeb] box-border px-[15px] py-[10px]";
|
|
2
|
-
export declare const inValidStyle = "rounded-[10px] border-solid border-[1px] border-[#ea3a3d] box-border px-[15px] py-[10px]";
|
|
3
|
-
export declare const inputSizeMap: {
|
|
4
|
-
small: string;
|
|
5
|
-
medium: string;
|
|
6
|
-
large: string;
|
|
7
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from "react";
|
|
2
|
-
interface InputProps extends Omit<ComponentProps<"input">, "size"> {
|
|
3
|
-
left?: ReactNode;
|
|
4
|
-
right?: ReactNode;
|
|
5
|
-
size?: "small" | "medium" | "large";
|
|
6
|
-
inValid?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare function Input({ className, size, type, left, right, disabled, inValid, style, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default Input;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Modal } from '.';
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Modal;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
3
|
-
type UseModalProps = {
|
|
4
|
-
hideCloseButton?: boolean;
|
|
5
|
-
closeButton?: React.ReactNode;
|
|
6
|
-
className?: string;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
placement?: "center" | "bottom" | "top";
|
|
9
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
10
|
-
zIndex: number;
|
|
11
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
12
|
-
onOpen?: () => void;
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
};
|
|
15
|
-
declare function useModal({ hideCloseButton, closeButton, isOpen, placement, motionVariant, zIndex, onOpen, onClose, onOpenChange, }: UseModalProps): {
|
|
16
|
-
isOpen: boolean;
|
|
17
|
-
placement: "center" | "bottom" | "top" | undefined;
|
|
18
|
-
hideCloseButton: boolean | undefined;
|
|
19
|
-
closeButton: import("react").ReactNode;
|
|
20
|
-
motionVariant: import("framer-motion").Variants | undefined;
|
|
21
|
-
zIndex: number;
|
|
22
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
23
|
-
};
|
|
24
|
-
export default useModal;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as Modal } from "./modal";
|
|
2
|
-
export { default as ModalContent } from "./modal-content";
|
|
3
|
-
export { default as ModalHeader } from "./modal-header";
|
|
4
|
-
export { default as ModalBody } from "./modal-body";
|
|
5
|
-
export { default as ModalFooter } from "./modal-footer";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface ModalContentProps {
|
|
3
|
-
children: React.ReactNode | ((onClose: () => void) => React.ReactNode);
|
|
4
|
-
disableAnimation?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
declare function ModalContent({ children, className, }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default ModalContent;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import Modal from "./modal";
|
|
4
|
-
type ModalProps = ComponentProps<typeof Modal>;
|
|
5
|
-
type ModalPropsContextValue = {
|
|
6
|
-
isOpen: ModalProps["isOpen"];
|
|
7
|
-
hideCloseButton: boolean | undefined;
|
|
8
|
-
closeButton: React.ReactNode;
|
|
9
|
-
placement?: "center" | "bottom" | "top";
|
|
10
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
11
|
-
zIndex: number;
|
|
12
|
-
onClose?: () => void;
|
|
13
|
-
onOpen?: () => void;
|
|
14
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
15
|
-
};
|
|
16
|
-
declare function useContext(): ModalPropsContextValue;
|
|
17
|
-
export declare function useModalContext(): {
|
|
18
|
-
ModalProvider: import("react").Provider<ModalPropsContextValue | undefined>;
|
|
19
|
-
useContext: typeof useContext;
|
|
20
|
-
Context: import("react").Context<ModalPropsContextValue | undefined>;
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const scaleInOut: {
|
|
2
|
-
enter: {
|
|
3
|
-
opacity: number;
|
|
4
|
-
x: string;
|
|
5
|
-
y: string;
|
|
6
|
-
transition: {
|
|
7
|
-
opacity: {
|
|
8
|
-
duration: number;
|
|
9
|
-
ease: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
exit: {
|
|
14
|
-
opacity: number;
|
|
15
|
-
x: string;
|
|
16
|
-
y: string;
|
|
17
|
-
transition: {
|
|
18
|
-
duration: number;
|
|
19
|
-
ease: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const slideInOut: {
|
|
24
|
-
enter: {
|
|
25
|
-
y: number;
|
|
26
|
-
x: string;
|
|
27
|
-
transition: {
|
|
28
|
-
y: {
|
|
29
|
-
bounce: number;
|
|
30
|
-
duration: number;
|
|
31
|
-
ease: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
exit: {
|
|
36
|
-
y: string;
|
|
37
|
-
x: string;
|
|
38
|
-
transition: {
|
|
39
|
-
y: {
|
|
40
|
-
bounce: number;
|
|
41
|
-
duration: number;
|
|
42
|
-
ease: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
3
|
-
export type ModalProps = {
|
|
4
|
-
onClose?: () => void;
|
|
5
|
-
onOpen?: () => void;
|
|
6
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
removeDimmer?: boolean;
|
|
9
|
-
hideCloseButton?: boolean;
|
|
10
|
-
allowCloseOnClickBackDrop?: boolean;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
closeButton?: React.ReactNode;
|
|
13
|
-
placement?: "top" | "bottom" | "center";
|
|
14
|
-
zIndex?: number;
|
|
15
|
-
modalId?: string;
|
|
16
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
17
|
-
};
|
|
18
|
-
declare function Modal({ children, removeDimmer, zIndex, allowCloseOnClickBackDrop, motionVariant, ...restProps }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export default Modal;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Popover } from '.';
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof Popover;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
argTypes: {
|
|
10
|
-
children: {
|
|
11
|
-
if: {
|
|
12
|
-
arg: string;
|
|
13
|
-
exists: false;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
isOpen: {
|
|
17
|
-
if: {
|
|
18
|
-
arg: string;
|
|
19
|
-
exists: false;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
motionVariant: {
|
|
23
|
-
if: {
|
|
24
|
-
arg: string;
|
|
25
|
-
exists: true;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default meta;
|
|
31
|
-
type Story = StoryObj<typeof meta>;
|
|
32
|
-
export declare const Default: Story;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
type UsePopoverProps = {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
zIndex: number;
|
|
5
|
-
className?: string;
|
|
6
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
7
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
8
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
9
|
-
onOpen?: () => void;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
};
|
|
12
|
-
declare function usePopover({ isOpen, zIndex, placement, motionVariant, onOpen, onClose, onOpenChange, }: UsePopoverProps): {
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
placement: "bottom" | "left" | "right" | "top" | undefined;
|
|
15
|
-
motionVariant: import("framer-motion").Variants | {
|
|
16
|
-
enter: {
|
|
17
|
-
opacity: number;
|
|
18
|
-
scale: number;
|
|
19
|
-
transition: {
|
|
20
|
-
opacity: {
|
|
21
|
-
duration: number;
|
|
22
|
-
ease: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
exit: {
|
|
27
|
-
opacity: number;
|
|
28
|
-
scale: number;
|
|
29
|
-
transition: {
|
|
30
|
-
duration: number;
|
|
31
|
-
ease: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
zIndex: number;
|
|
36
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
37
|
-
};
|
|
38
|
-
export default usePopover;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type PopoverContentProps = {
|
|
3
|
-
children: React.ReactNode | ((onClose: () => void) => React.ReactNode);
|
|
4
|
-
};
|
|
5
|
-
declare function PopoverContent({ children }: PopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default PopoverContent;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
import Popover from "./popover";
|
|
4
|
-
type PopoverProps = ComponentProps<typeof Popover>;
|
|
5
|
-
type PopoverPropsContextValue = {
|
|
6
|
-
isOpen: PopoverProps["isOpen"];
|
|
7
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
8
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
9
|
-
zIndex: number;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
onOpen?: () => void;
|
|
12
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
13
|
-
};
|
|
14
|
-
declare function useContext(): PopoverPropsContextValue;
|
|
15
|
-
export declare function usePopoverContext(): {
|
|
16
|
-
PopoverProvider: import("react").Provider<PopoverPropsContextValue | undefined>;
|
|
17
|
-
useContext: typeof useContext;
|
|
18
|
-
Context: import("react").Context<PopoverPropsContextValue | undefined>;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const scaleInOut: {
|
|
2
|
-
enter: {
|
|
3
|
-
opacity: number;
|
|
4
|
-
scale: number;
|
|
5
|
-
transition: {
|
|
6
|
-
opacity: {
|
|
7
|
-
duration: number;
|
|
8
|
-
ease: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exit: {
|
|
13
|
-
opacity: number;
|
|
14
|
-
scale: number;
|
|
15
|
-
transition: {
|
|
16
|
-
duration: number;
|
|
17
|
-
ease: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface PopoverProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
children: ReactNode[];
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
zIndex?: number;
|
|
8
|
-
offset?: number;
|
|
9
|
-
placement?: "top" | "bottom" | "left" | "right";
|
|
10
|
-
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
11
|
-
onOpenChange: (isOpen: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @example
|
|
15
|
-
* <Popover
|
|
16
|
-
* isOpen={isOpen}
|
|
17
|
-
* onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
|
18
|
-
* offset={-70}
|
|
19
|
-
* >
|
|
20
|
-
* <PopoverTrigger>
|
|
21
|
-
* <Button className=" bg-slate-600">Open Popover</Button>
|
|
22
|
-
* </PopoverTrigger>
|
|
23
|
-
* <PopoverContent>
|
|
24
|
-
* <div className=" bg-slate-500 p-[10px]">popover content</div>
|
|
25
|
-
* </PopoverContent>
|
|
26
|
-
* </Popover>
|
|
27
|
-
*/
|
|
28
|
-
declare function Popover({ children, id, placement, zIndex, offset, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export default Popover;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from "react";
|
|
2
|
-
interface SkeletinProps {
|
|
3
|
-
width: CSSProperties["width"];
|
|
4
|
-
height: CSSProperties["height"];
|
|
5
|
-
borderRadius?: CSSProperties["borderRadius"];
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
declare function Skeleton({ className, children, width, height, borderRadius, }: SkeletinProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default Skeleton;
|