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
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ownui-design-system
|
|
2
|
+
|
|
3
|
+
## Components
|
|
4
|
+
|
|
5
|
+
- [x] Button
|
|
6
|
+
- [x] Input
|
|
7
|
+
- [x] TextField
|
|
8
|
+
- [x] Spacing
|
|
9
|
+
- [x] Flex
|
|
10
|
+
- [x] Skeleton
|
|
11
|
+
- [x] TextArea
|
|
12
|
+
- [x] Text
|
|
13
|
+
- [x] Dimmed
|
|
14
|
+
- [x] Modal
|
|
15
|
+
- [x] Divider
|
|
16
|
+
- [x] PopOver
|
|
17
|
+
- [x] Tab / TabGroup
|
|
18
|
+
- [x] Badge
|
|
19
|
+
- [x] Checkbox
|
|
20
|
+
- [x] Drawer
|
|
21
|
+
- [x] Dropdown
|
|
22
|
+
- [x] Accordion
|
|
23
|
+
- [ ] Tooltip
|
|
24
|
+
- [ ] Radio / RadioGroup
|
|
25
|
+
- [ ] Step
|
|
26
|
+
- [ ] BottomSheet
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type AccordionContextValue = {
|
|
3
|
+
selected?: string | number;
|
|
4
|
+
defaultSelected?: string | number;
|
|
5
|
+
type?: "single" | "multi";
|
|
6
|
+
variant: "light" | "splitted" | "bordered";
|
|
7
|
+
color: string;
|
|
8
|
+
onChange: (selected?: string | number) => void;
|
|
9
|
+
};
|
|
10
|
+
declare function useContext(): AccordionContextValue;
|
|
11
|
+
export declare function useAccordionContext(): {
|
|
12
|
+
AccordionProvider: import("react").Provider<AccordionContextValue | undefined>;
|
|
13
|
+
useContext: typeof useContext;
|
|
14
|
+
Context: import("react").Context<AccordionContextValue | undefined>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AccordionHeaderProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare function AccordionHeader({ children, isOpen, icon, onClick, }: AccordionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default AccordionHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AccordionItemProps {
|
|
3
|
+
header: React.ReactNode;
|
|
4
|
+
headerIcon?: React.ReactNode;
|
|
5
|
+
body: React.ReactNode;
|
|
6
|
+
value: string | number;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function AccordionItem({ className, header, headerIcon, body, value, disabled, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default AccordionItem;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const collapse: {
|
|
2
|
+
enter: {
|
|
3
|
+
opacity: number;
|
|
4
|
+
height: string;
|
|
5
|
+
transition: {
|
|
6
|
+
height: {
|
|
7
|
+
duration: number;
|
|
8
|
+
ease: string;
|
|
9
|
+
};
|
|
10
|
+
opacity: {
|
|
11
|
+
duration: number;
|
|
12
|
+
ease: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exit: {
|
|
17
|
+
opacity: number;
|
|
18
|
+
height: number;
|
|
19
|
+
transition: {
|
|
20
|
+
duration: number;
|
|
21
|
+
ease: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AccordionProps {
|
|
3
|
+
defaultSelected?: string | number;
|
|
4
|
+
type?: "single" | "multi";
|
|
5
|
+
variant?: "light" | "splitted" | "bordered";
|
|
6
|
+
onChange?: (selected?: string | number) => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
color?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function Accordion({ className, children, defaultSelected, type, variant, color, onChange, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Accordion;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const baseStyle = "flex items-center justify-center absolute z-[1] text-center";
|
|
2
|
+
export declare const badgeSizeMap: {
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const badgePlacementMap: {
|
|
8
|
+
small: {
|
|
9
|
+
"top-left": string;
|
|
10
|
+
"top-right": string;
|
|
11
|
+
"bottom-left": string;
|
|
12
|
+
"bottom-right": string;
|
|
13
|
+
};
|
|
14
|
+
medium: {
|
|
15
|
+
"top-left": string;
|
|
16
|
+
"top-right": string;
|
|
17
|
+
"bottom-left": string;
|
|
18
|
+
"bottom-right": string;
|
|
19
|
+
};
|
|
20
|
+
large: {
|
|
21
|
+
"top-left": string;
|
|
22
|
+
"top-right": string;
|
|
23
|
+
"bottom-left": string;
|
|
24
|
+
"bottom-right": string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const fadeInOut: {
|
|
2
|
+
enter: {
|
|
3
|
+
opacity: number;
|
|
4
|
+
transition: {
|
|
5
|
+
opacity: {
|
|
6
|
+
duration: number;
|
|
7
|
+
ease: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
exit: {
|
|
12
|
+
opacity: number;
|
|
13
|
+
transition: {
|
|
14
|
+
duration: number;
|
|
15
|
+
ease: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface BadgeProps {
|
|
3
|
+
content?: React.ReactNode;
|
|
4
|
+
color: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
size?: "large" | "medium" | "small";
|
|
7
|
+
placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
8
|
+
className?: string;
|
|
9
|
+
radius?: string | number;
|
|
10
|
+
isVisible?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function Badge({ className, radius, size, color, placement, content, isVisible, children, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Badge;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type BUTTON_SIZE_TYPE = keyof typeof buttonSizeMap;
|
|
2
|
+
export declare const baseStyle = "flex items-center justify-center h-fit transition-all duration-100 ease-linear w-[var(--width)] border-[1px] bg-[var(--bg-color)] border-[var(--border-color)] border-solid disabled:opacity-30";
|
|
3
|
+
export declare const buttonSizeMap: {
|
|
4
|
+
normal: {
|
|
5
|
+
xsmall: string;
|
|
6
|
+
small: string;
|
|
7
|
+
medium: string;
|
|
8
|
+
large: string;
|
|
9
|
+
xlarge: string;
|
|
10
|
+
};
|
|
11
|
+
icon: {
|
|
12
|
+
xsmall: string;
|
|
13
|
+
small: string;
|
|
14
|
+
medium: string;
|
|
15
|
+
large: string;
|
|
16
|
+
xlarge: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const buttonTextSize: {
|
|
20
|
+
xsmall: string;
|
|
21
|
+
small: string;
|
|
22
|
+
medium: string;
|
|
23
|
+
large: string;
|
|
24
|
+
xlarge: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function buttonHoverStyle(variant: "normal" | "line" | "text"): "hover:text-white hover:bg-[var(--border-color)] disabled:bg-[var(--bg-color)] disabled:text-current" | "hover:opacity-[0.9] hover:brightness-[0.9] disabled:bg-[var(--bg-color)]";
|
|
27
|
+
export declare function buttonTypeMap(color: string): {
|
|
28
|
+
normal: {
|
|
29
|
+
"--bg-color": string;
|
|
30
|
+
"--border-color": string;
|
|
31
|
+
};
|
|
32
|
+
line: {
|
|
33
|
+
"--border-color": string;
|
|
34
|
+
"--bg-color": string;
|
|
35
|
+
};
|
|
36
|
+
text: {
|
|
37
|
+
"--bg-color": string;
|
|
38
|
+
"--border-color": string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export interface ButtonProps extends ComponentProps<"button"> {
|
|
3
|
+
size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
|
|
4
|
+
variant?: "normal" | "line" | "text";
|
|
5
|
+
width?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
startContent?: ReactNode;
|
|
8
|
+
endContent?: ReactNode;
|
|
9
|
+
isOnlyIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export default Button;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const labelStyle = "inline-flex gap-[6px] items-center ";
|
|
2
|
+
export declare const wrapperStyle: {
|
|
3
|
+
base: string;
|
|
4
|
+
before: string;
|
|
5
|
+
after: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const iconStyle = "absolute z-[3]";
|
|
8
|
+
export declare const checkBoxSize: {
|
|
9
|
+
small: {
|
|
10
|
+
box: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
};
|
|
13
|
+
medium: {
|
|
14
|
+
box: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
large: {
|
|
18
|
+
box: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const radiusSize: {
|
|
23
|
+
full: string;
|
|
24
|
+
large: string;
|
|
25
|
+
medium: string;
|
|
26
|
+
small: string;
|
|
27
|
+
none: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
size?: "small" | "medium" | "large";
|
|
4
|
+
isChecked?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
radius?: "small" | "medium" | "large" | "full" | "none";
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
color?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
17
|
+
export default Checkbox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from "react";
|
|
2
|
+
interface DimmedProps extends PropsWithChildren {
|
|
3
|
+
className?: string;
|
|
4
|
+
opacity?: CSSProperties["opacity"];
|
|
5
|
+
removeDimmer?: boolean;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function BackDrop({ children, onClick, className, opacity, removeDimmer, zIndex, }: DimmedProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default BackDrop;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type DividerProps = {
|
|
2
|
+
size?: string | number;
|
|
3
|
+
color?: string;
|
|
4
|
+
direction?: "horizontal" | "vertical";
|
|
5
|
+
margin?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function Divider({ size, margin, color, direction, }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Divider;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface DrawerContentProps {
|
|
3
|
+
children: React.ReactNode | ((onClose: () => void) => React.ReactNode);
|
|
4
|
+
className?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function DrawerContent({ children, className, color, }: DrawerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default DrawerContent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLMotionProps } from "framer-motion";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import Drawer from ".";
|
|
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 {};
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -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,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,24 @@
|
|
|
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;
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|