ownui-system 0.0.0
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 +26 -0
- package/dist/App.d.ts +2 -0
- package/dist/components/Accordion/accordion-body.d.ts +6 -0
- package/dist/components/Accordion/accordion-context.d.ts +16 -0
- package/dist/components/Accordion/accordion-header.d.ts +9 -0
- package/dist/components/Accordion/accordion-item.d.ts +11 -0
- package/dist/components/Accordion/accordion-style.d.ts +10 -0
- package/dist/components/Accordion/accortion-transition.d.ts +24 -0
- package/dist/components/Accordion/index.d.ts +12 -0
- package/dist/components/Badge/Badge.style.d.ts +26 -0
- package/dist/components/Badge/badge-transition.d.ts +18 -0
- package/dist/components/Badge/index.d.ts +13 -0
- package/dist/components/Button/Button.style.d.ts +40 -0
- package/dist/components/Button/index.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.style.d.ts +28 -0
- package/dist/components/Checkbox/CheckboxIcon.d.ts +6 -0
- package/dist/components/Checkbox/index.d.ts +17 -0
- package/dist/components/Dimmed/Dimmed.style.d.ts +3 -0
- package/dist/components/Dimmed/index.d.ts +10 -0
- package/dist/components/Divider/index.d.ts +8 -0
- package/dist/components/Drawer/DrawerStyle.d.ts +7 -0
- package/dist/components/Drawer/drawer-content.d.ts +8 -0
- package/dist/components/Drawer/drawer-context.d.ts +19 -0
- package/dist/components/Drawer/drawer-transition.d.ts +64 -0
- package/dist/components/Drawer/hook/useDrawer.d.ts +20 -0
- package/dist/components/Drawer/index.d.ts +14 -0
- package/dist/components/Dropdown/dropdown-body.d.ts +7 -0
- package/dist/components/Dropdown/dropdown-content.d.ts +6 -0
- package/dist/components/Dropdown/dropdown-context.d.ts +15 -0
- package/dist/components/Dropdown/dropdown-item.d.ts +9 -0
- package/dist/components/Dropdown/dropdown-transition.d.ts +20 -0
- package/dist/components/Dropdown/dropdown-trigger.d.ts +6 -0
- package/dist/components/Dropdown/hook/useDropdown.d.ts +17 -0
- package/dist/components/Dropdown/index.d.ts +10 -0
- package/dist/components/Input/Input.style.d.ts +7 -0
- package/dist/components/Input/index.d.ts +9 -0
- package/dist/components/Modal/hook/useModal.d.ts +24 -0
- package/dist/components/Modal/index.d.ts +19 -0
- package/dist/components/Modal/modal-body.d.ts +6 -0
- package/dist/components/Modal/modal-content.d.ts +8 -0
- package/dist/components/Modal/modal-context.d.ts +22 -0
- package/dist/components/Modal/modal-footer.d.ts +6 -0
- package/dist/components/Modal/modal-header.d.ts +6 -0
- package/dist/components/Modal/modal-transition.d.ts +46 -0
- package/dist/components/Popover/hook/usePopover.d.ts +38 -0
- package/dist/components/Popover/index.d.ts +29 -0
- package/dist/components/Popover/popover-content.d.ts +6 -0
- package/dist/components/Popover/popover-context.d.ts +20 -0
- package/dist/components/Popover/popover-transition.d.ts +20 -0
- package/dist/components/Popover/popover-trigger.d.ts +3 -0
- package/dist/components/Skeleton/index.d.ts +10 -0
- package/dist/components/Tab/Tab.style.d.ts +29 -0
- package/dist/components/Tab/index.d.ts +9 -0
- package/dist/components/Tab/tab-context.d.ts +13 -0
- package/dist/components/Tab/tab-group.d.ts +9 -0
- package/dist/components/Text/index.d.ts +10 -0
- package/dist/components/TextArea/TextArea.style.d.ts +6 -0
- package/dist/components/TextArea/index.d.ts +10 -0
- package/dist/components/TextField/index.d.ts +10 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/shared/Flex.d.ts +13 -0
- package/dist/components/shared/Portal.d.ts +9 -0
- package/dist/components/shared/Spacing.d.ts +6 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useClickOutSideEffect.d.ts +3 -0
- package/dist/hooks/useDomRef.d.ts +4 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
- package/dist/hooks/useMounted.d.ts +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/main.d.ts +0 -0
- package/dist/ownui-system.js +4390 -0
- package/dist/ownui-system.js.map +1 -0
- package/dist/ownui-system.umd.cjs +36 -0
- package/dist/ownui-system.umd.cjs.map +1 -0
- package/dist/styles/colors.d.ts +38 -0
- package/dist/styles/typography.d.ts +173 -0
- package/dist/types/index.d.ts +6 -0
- package/package.json +82 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import Modal from ".";
|
|
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 {};
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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;
|
|
@@ -0,0 +1,29 @@
|
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import Popover from ".";
|
|
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 {};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const baseStyle: {
|
|
2
|
+
text: string;
|
|
3
|
+
box: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const activeStyle: {
|
|
6
|
+
text: string;
|
|
7
|
+
box: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const tabSize: {
|
|
10
|
+
text: {
|
|
11
|
+
large: string;
|
|
12
|
+
medium: string;
|
|
13
|
+
small: string;
|
|
14
|
+
};
|
|
15
|
+
box: {
|
|
16
|
+
large: string;
|
|
17
|
+
medium: string;
|
|
18
|
+
small: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const tabGroupBaseStyle: {
|
|
22
|
+
text: string;
|
|
23
|
+
box: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const tabGroupGap: {
|
|
26
|
+
large: string;
|
|
27
|
+
medium: string;
|
|
28
|
+
small: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TabProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function Tab({ children, active, onClick }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Tab;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type TabPropsContextValue = {
|
|
3
|
+
type?: "text" | "box";
|
|
4
|
+
size?: "large" | "medium" | "small";
|
|
5
|
+
activeColor?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function useContext(): TabPropsContextValue;
|
|
8
|
+
export declare function useTabContext(): {
|
|
9
|
+
TabProvider: import("react").Provider<TabPropsContextValue | undefined>;
|
|
10
|
+
useContext: typeof useContext;
|
|
11
|
+
Context: import("react").Context<TabPropsContextValue | undefined>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TabGroupProps {
|
|
3
|
+
type?: "text" | "box";
|
|
4
|
+
size?: "large" | "medium" | "small";
|
|
5
|
+
activeColor?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function TabGroup({ children, size, type, activeColor, }: TabGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default TabGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from "react";
|
|
2
|
+
type TextProps = {
|
|
3
|
+
fontSize?: CSSProperties["fontSize"];
|
|
4
|
+
fontWeight?: CSSProperties["fontWeight"];
|
|
5
|
+
color?: CSSProperties["color"];
|
|
6
|
+
bold?: boolean;
|
|
7
|
+
needGradient?: boolean;
|
|
8
|
+
} & PropsWithChildren;
|
|
9
|
+
declare function Text({ fontSize, fontWeight, color, bold, needGradient, children, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Text;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
|
+
export interface TextAreaProps extends Omit<ComponentProps<"textarea">, "size"> {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
helpMessage?: React.ReactNode;
|
|
6
|
+
focusColor?: CSSProperties["color"];
|
|
7
|
+
size?: "small" | "large";
|
|
8
|
+
}
|
|
9
|
+
declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
export default TextArea;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
|
+
export interface TextFieldProps extends Omit<ComponentProps<"input">, "size"> {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
hasError?: boolean;
|
|
5
|
+
helpMessage?: React.ReactNode;
|
|
6
|
+
focusColor?: CSSProperties["color"];
|
|
7
|
+
size?: "small" | "medium" | "large";
|
|
8
|
+
}
|
|
9
|
+
declare const TextField: import("react").ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export default TextField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Dimmed } from "./Dimmed";
|
|
2
|
+
export { default as Button } from "./Button";
|
|
3
|
+
export { default as Input } from "./Input";
|
|
4
|
+
export { default as Text } from "./Text";
|
|
5
|
+
export { default as TextArea } from "./TextArea";
|
|
6
|
+
export { default as TextField } from "./TextField";
|
|
7
|
+
export { default as Divider } from "./Divider";
|
|
8
|
+
export { default as Skeleton } from "./Skeleton";
|
|
9
|
+
export { default as Badge } from "./Badge";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from "react";
|
|
2
|
+
interface FlexProps extends PropsWithChildren {
|
|
3
|
+
display?: "flex" | "inline-flex";
|
|
4
|
+
align?: CSSProperties["alignItems"];
|
|
5
|
+
justify?: CSSProperties["justifyContent"];
|
|
6
|
+
direction?: CSSProperties["flexDirection"];
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
wrap?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare function Flex({ className, display, align, justify, direction, wrap, style, children, onClick, }: FlexProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Flex;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
container?: React.RefObject<HTMLElement>;
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createPortalRoot(id: string): HTMLDivElement;
|
|
8
|
+
declare function Portal({ children, ...rest }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default Portal;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @description serverside인 경우 useLayoutEffect에 대한 경고 메시지가 발생하는 이슈에 대하여
|
|
4
|
+
* clientside인 경우 useLayoutEffect, serverside인 경우 useEffect를 사용하도록 하는 목적의 커스텀 훅
|
|
5
|
+
*/
|
|
6
|
+
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
7
|
+
export default useIsomorphicLayoutEffect;
|
package/dist/index.d.ts
ADDED
package/dist/main.d.ts
ADDED
|
File without changes
|