ownui-system 0.0.0 → 0.0.2
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 +3 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +23 -0
- package/dist/components/Accordion/accordion.d.ts +12 -0
- package/dist/components/Accordion/index.d.ts +2 -12
- package/dist/components/Badge/Badge.stories.d.ts +14 -0
- package/dist/components/BottomSheet/bottomsheet-body.d.ts +7 -0
- package/dist/components/BottomSheet/bottomsheet-contents.d.ts +3 -0
- package/dist/components/BottomSheet/bottomsheet-context.d.ts +14 -0
- package/dist/components/BottomSheet/bottomsheet-header.d.ts +3 -0
- package/dist/components/BottomSheet/bottomsheet-transition.d.ts +23 -0
- package/dist/components/BottomSheet/bottomsheet.d.ts +14 -0
- package/dist/components/BottomSheet/index.d.ts +1 -0
- package/dist/components/Button/Button.stories.d.ts +43 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +30 -0
- package/dist/components/Divider/Divider.stories.d.ts +19 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +36 -0
- package/dist/components/Drawer/drawer-context.d.ts +1 -1
- package/dist/components/Drawer/drawer.d.ts +14 -0
- package/dist/components/Drawer/index.d.ts +2 -14
- package/dist/components/Dropdown/Dropdown.stories.d.ts +12 -0
- package/dist/components/Dropdown/dropdown.d.ts +10 -0
- package/dist/components/Dropdown/index.d.ts +3 -10
- package/dist/components/Input/Input.stories.d.ts +37 -0
- package/dist/components/Input/Input.style.d.ts +1 -1
- package/dist/components/Modal/Modal.stories.d.ts +12 -0
- package/dist/components/Modal/index.d.ts +5 -19
- package/dist/components/Modal/modal-context.d.ts +1 -1
- package/dist/components/Modal/modal.d.ts +19 -0
- package/dist/components/Popover/Popover.stories.d.ts +32 -0
- package/dist/components/Popover/index.d.ts +3 -29
- package/dist/components/Popover/popover-context.d.ts +1 -1
- package/dist/components/Popover/popover.d.ts +29 -0
- package/dist/components/Tab/Tab.stories.d.ts +16 -0
- package/dist/components/TextArea/TextArea.stories.d.ts +33 -0
- package/dist/components/TextField/TextField.stories.d.ts +30 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/ownui-system.js +5058 -2770
- package/dist/ownui-system.js.map +1 -1
- package/dist/ownui-system.umd.cjs +14 -14
- package/dist/ownui-system.umd.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# ownui-design-system
|
|
2
2
|
|
|
3
|
+
- react, tailwindcss
|
|
4
|
+
|
|
3
5
|
## Components
|
|
4
6
|
|
|
5
7
|
- [x] Button
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
- [x] Drawer
|
|
21
23
|
- [x] Dropdown
|
|
22
24
|
- [x] Accordion
|
|
25
|
+
- [x] BottomSheet
|
|
23
26
|
- [ ] Tooltip
|
|
24
27
|
- [ ] Radio / RadioGroup
|
|
25
28
|
- [ ] Step
|
|
26
|
-
- [ ] BottomSheet
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Accordion } from '.';
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Accordion;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
type: {
|
|
11
|
+
if: {
|
|
12
|
+
arg: string;
|
|
13
|
+
exists: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Default: Story;
|
|
21
|
+
export declare const Bordered: Story;
|
|
22
|
+
export declare const Splitted: Story;
|
|
23
|
+
export declare const Multi: Story;
|
|
@@ -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;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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;
|
|
1
|
+
export { default as Accordion } from "./accordion";
|
|
2
|
+
export { default as AccordionItem } from "./accordion-item";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Badge from '.';
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Badge;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithContent: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface BottomSheetBodyProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function BottomSheetBody({ children, className }: BottomSheetBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default BottomSheetBody;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type BottomSheetContextValue = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
zIndex: number;
|
|
5
|
+
color: string;
|
|
6
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
declare function useContext(): BottomSheetContextValue;
|
|
9
|
+
export declare function useBottomSheetContext(): {
|
|
10
|
+
BottomSheetProvider: import("react").Provider<BottomSheetContextValue | undefined>;
|
|
11
|
+
useContext: typeof useContext;
|
|
12
|
+
Context: import("react").Context<BottomSheetContextValue | undefined>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function bottomSheetOpenClose(viewPort: string, minHeight: string, maxHeight: string): {
|
|
2
|
+
opened: {
|
|
3
|
+
top: string;
|
|
4
|
+
transition: {
|
|
5
|
+
duration: number;
|
|
6
|
+
ease: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
closed: {
|
|
10
|
+
top: string;
|
|
11
|
+
transition: {
|
|
12
|
+
duration: number;
|
|
13
|
+
ease: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
expanded: {
|
|
17
|
+
top: string;
|
|
18
|
+
transition: {
|
|
19
|
+
duration: number;
|
|
20
|
+
ease: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface BottomSheetProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
removeDimmer?: boolean;
|
|
5
|
+
zIndex?: number;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
color?: string;
|
|
8
|
+
allowCloseOnClickBackDrop?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onOpen?: () => void;
|
|
11
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function BottomSheet({ children, removeDimmer, isOpen, allowCloseOnClickBackDrop, color, zIndex, ...props }: BottomSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default BottomSheet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BottomSheet } from "./bottomsheet";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import('.').ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
type: {
|
|
11
|
+
if: {
|
|
12
|
+
arg: string;
|
|
13
|
+
exists: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
children: {
|
|
17
|
+
control: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
disabled: {
|
|
22
|
+
control: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
startContent: {
|
|
27
|
+
if: {
|
|
28
|
+
arg: string;
|
|
29
|
+
exists: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
endContent: {
|
|
33
|
+
if: {
|
|
34
|
+
arg: string;
|
|
35
|
+
exists: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
tags: string[];
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<typeof meta>;
|
|
43
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<import('.').CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
isChecked: {
|
|
11
|
+
if: {
|
|
12
|
+
arg: string;
|
|
13
|
+
exists: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
radius: {
|
|
17
|
+
control: string;
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
control: string;
|
|
22
|
+
options: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
export declare const Controlled: Story;
|
|
30
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Divider from '.';
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Divider;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
direction: {
|
|
11
|
+
control: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import Drawer from "./drawer";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Drawer;
|
|
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;
|
|
33
|
+
export declare const FromTop: Story;
|
|
34
|
+
export declare const FromBottom: Story;
|
|
35
|
+
export declare const FromLeft: Story;
|
|
36
|
+
export declare const FromRight: Story;
|
|
@@ -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;
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
export { default as Drawer } from "./drawer";
|
|
2
|
+
export { default as DrawerContent } from "./drawer-content";
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -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;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
export { default as Dropdown } from "./dropdown";
|
|
2
|
+
export { default as DropdownBody } from "./dropdown-body";
|
|
3
|
+
export { default as DropdownItem } from "./dropdown-item";
|
|
@@ -0,0 +1,37 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
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]
|
|
2
|
+
export declare const inValidStyle = "rounded-[10px] border-solid border-[1px] border-[#ea3a3d] box-border px-[15px] py-[10px]";
|
|
3
3
|
export declare const inputSizeMap: {
|
|
4
4
|
small: string;
|
|
5
5
|
medium: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
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,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
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";
|
|
@@ -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,32 @@
|
|
|
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,29 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
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
|
+
export { default as Popover } from "./popover";
|
|
2
|
+
export { default as PopoverContent } from "./popover-content";
|
|
3
|
+
export { default as PopoverTrigger } from "./popover-trigger";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
import Popover from "
|
|
3
|
+
import Popover from "./popover";
|
|
4
4
|
type PopoverProps = ComponentProps<typeof Popover>;
|
|
5
5
|
type PopoverPropsContextValue = {
|
|
6
6
|
isOpen: PopoverProps["isOpen"];
|
|
@@ -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,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import Tab from ".";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Tab;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Box: Story;
|
|
15
|
+
export declare const TextTabGroup: Story;
|
|
16
|
+
export declare const BoxTabGroup: Story;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Omit<import('.').TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
};
|
|
14
|
+
hasError: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
disabled: {
|
|
20
|
+
control: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
focusColor: {
|
|
25
|
+
controls: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const Default: Story;
|