ownui-system 0.0.12 → 0.1.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 +2 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +1 -0
- package/dist/components/Accordion/accordion-body.d.ts +2 -1
- package/dist/components/Accordion/accordion-item.d.ts +2 -1
- package/dist/components/Drawer/drawer-context.d.ts +2 -1
- package/dist/components/Drawer/drawer.d.ts +2 -1
- package/dist/components/InfiniteSlider/InfiniteSlider-item.d.ts +7 -0
- package/dist/components/InfiniteSlider/InfiniteSlider.d.ts +11 -0
- package/dist/components/InfiniteSlider/InfiniteSlider.stories.d.ts +13 -0
- package/dist/components/InfiniteSlider/InfiniteSlider.style.d.ts +3 -0
- package/dist/components/InfiniteSlider/index.d.ts +2 -0
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/Popover/hook/usePopover.d.ts +3 -2
- package/dist/components/Popover/popover-context.d.ts +2 -1
- package/dist/components/Popover/popover.d.ts +2 -1
- package/dist/components/Tab/tab-group.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +16 -0
- package/dist/components/Tooltip/index.d.ts +12 -0
- package/dist/components/Tooltip/tooltip-style.d.ts +29 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/ownui-system.js +5189 -2653
- package/dist/ownui-system.js.map +1 -1
- package/dist/ownui-system.umd.cjs +13 -13
- package/dist/ownui-system.umd.cjs.map +1 -1
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -2
- /package/dist/components/Drawer/{DrawerStyle.d.ts → drawer-style.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface AccordionBodyProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
+
isAfterOpen: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare function AccordionBody({ children }: AccordionBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionBody({ children, isAfterOpen }: AccordionBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default AccordionBody;
|
|
@@ -6,6 +6,7 @@ interface AccordionItemProps {
|
|
|
6
6
|
value: string | number;
|
|
7
7
|
className?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare function AccordionItem({ className, header, headerIcon, body, value, disabled, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AccordionItem({ className, header, headerIcon, body, value, disabled, defaultOpen, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default AccordionItem;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { ComponentPosition } from '../../types';
|
|
1
2
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
import Drawer from "./drawer";
|
|
4
5
|
type DrawerProps = ComponentProps<typeof Drawer>;
|
|
5
6
|
type DrawerContextValue = {
|
|
6
7
|
isOpen: DrawerProps["isOpen"];
|
|
7
|
-
placement?:
|
|
8
|
+
placement?: ComponentPosition;
|
|
8
9
|
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
9
10
|
zIndex?: number;
|
|
10
11
|
drawerId: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { ComponentPosition } from '../../types';
|
|
2
3
|
import { HTMLMotionProps } from "framer-motion";
|
|
3
4
|
export type DrawerProps = {
|
|
4
5
|
onOpenChange: (isOpen: boolean) => void;
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
|
-
placement?:
|
|
8
|
+
placement?: ComponentPosition;
|
|
8
9
|
zIndex?: number;
|
|
9
10
|
drawerId?: string;
|
|
10
11
|
allowCloseOnClickBackDrop?: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
type InfiniteSliderItemProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
position?: number;
|
|
5
|
+
} & PropsWithChildren;
|
|
6
|
+
declare function InfiniteSliderItem({ className, children, position, }: InfiniteSliderItemProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default InfiniteSliderItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import "./style.css";
|
|
3
|
+
type InfiniteSliderProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
width: string;
|
|
6
|
+
height: string;
|
|
7
|
+
reverse?: boolean;
|
|
8
|
+
stopOnHover?: boolean;
|
|
9
|
+
} & PropsWithChildren;
|
|
10
|
+
declare function InfiniteSlider({ width, height, reverse, stopOnHover, children, }: InfiniteSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default InfiniteSlider;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import InfiniteSlider from "./InfiniteSlider";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof InfiniteSlider;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Reverse: Story;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const sliderWrapperStyle = "w-full h-[var(--height)] overflow-hidden";
|
|
2
|
+
export declare const sliderListStyle = "flex w-full relative min-w-[calc(var(--width)*var(--quantity))]";
|
|
3
|
+
export declare const sliderItemStyle = "w-[var(--width)] h-[var(--height)] absolute left-[100%]";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { ComponentPosition } from '../../../types';
|
|
1
2
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
3
|
type UsePopoverProps = {
|
|
3
4
|
isOpen: boolean;
|
|
4
5
|
zIndex: number;
|
|
5
6
|
className?: string;
|
|
6
|
-
placement?:
|
|
7
|
+
placement?: ComponentPosition;
|
|
7
8
|
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
8
9
|
onOpenChange: (isOpen: boolean) => void;
|
|
9
10
|
onOpen?: () => void;
|
|
@@ -11,7 +12,7 @@ type UsePopoverProps = {
|
|
|
11
12
|
};
|
|
12
13
|
declare function usePopover({ isOpen, zIndex, placement, motionVariant, onOpen, onClose, onOpenChange, }: UsePopoverProps): {
|
|
13
14
|
isOpen: boolean;
|
|
14
|
-
placement:
|
|
15
|
+
placement: ComponentPosition | undefined;
|
|
15
16
|
motionVariant: import("framer-motion").Variants | {
|
|
16
17
|
enter: {
|
|
17
18
|
opacity: number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { ComponentPosition } from '../../types';
|
|
1
2
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
import Popover from "./popover";
|
|
4
5
|
type PopoverProps = ComponentProps<typeof Popover>;
|
|
5
6
|
type PopoverPropsContextValue = {
|
|
6
7
|
isOpen: PopoverProps["isOpen"];
|
|
7
|
-
placement?:
|
|
8
|
+
placement?: ComponentPosition;
|
|
8
9
|
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
9
10
|
zIndex: number;
|
|
10
11
|
onClose?: () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ComponentPosition } from '../../types';
|
|
1
2
|
import { HTMLMotionProps } from "framer-motion";
|
|
2
3
|
import { ReactNode } from "react";
|
|
3
4
|
export interface PopoverProps {
|
|
@@ -7,7 +8,7 @@ export interface PopoverProps {
|
|
|
7
8
|
zIndex?: number;
|
|
8
9
|
topOffset?: number;
|
|
9
10
|
leftOffset?: number;
|
|
10
|
-
placement?:
|
|
11
|
+
placement?: ComponentPosition;
|
|
11
12
|
motionVariant?: HTMLMotionProps<"div">["variants"];
|
|
12
13
|
onOpenChange: (isOpen: boolean) => void;
|
|
13
14
|
}
|
|
@@ -4,6 +4,7 @@ interface TabGroupProps {
|
|
|
4
4
|
size?: "large" | "medium" | "small";
|
|
5
5
|
activeColor?: string;
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
7
8
|
}
|
|
8
|
-
declare function TabGroup({ children, size, type, activeColor, }: TabGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TabGroup({ children, className, size, type, activeColor, }: TabGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default TabGroup;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import Tooltip from ".";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Tooltip;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Top: Story;
|
|
14
|
+
export declare const Bottom: Story;
|
|
15
|
+
export declare const Left: Story;
|
|
16
|
+
export declare const Right: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentPosition } from '../../types';
|
|
2
|
+
import { type CSSProperties, type PropsWithChildren } from "react";
|
|
3
|
+
type TooltipProps = {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
message: string;
|
|
6
|
+
placement?: ComponentPosition;
|
|
7
|
+
className?: string;
|
|
8
|
+
tailOffset?: string;
|
|
9
|
+
bgColor?: CSSProperties["backgroundColor"];
|
|
10
|
+
} & PropsWithChildren;
|
|
11
|
+
declare function Tooltip({ children, className, open, message, placement, tailOffset, bgColor, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Tooltip;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const baseStyle = "relative inline-block text-center";
|
|
2
|
+
export declare const afterStyle = "after:absolute after:content-[''] after:block after:text-[var(--text-color)] after:border after:w-0 after:h-0 after:opacity-0 after:transition-all after:delay-100";
|
|
3
|
+
export declare const beforeStyle = "before:absolute before:pointer-events-none before:z-[1] before:content-[attr(data-tip)] before:rounded-md before:px-1 before:py-2 before:bg-[var(--bg-color)] before:max-w-80 before:w-max before:whitespace-normal before:opacity-0 before:transition-all before:delay-100 ";
|
|
4
|
+
export declare const hoverStyle: {
|
|
5
|
+
before: string;
|
|
6
|
+
after: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const openStyle: {
|
|
9
|
+
before: string;
|
|
10
|
+
after: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const positionStyle: {
|
|
13
|
+
top: {
|
|
14
|
+
after: string;
|
|
15
|
+
before: string;
|
|
16
|
+
};
|
|
17
|
+
bottom: {
|
|
18
|
+
after: string;
|
|
19
|
+
before: string;
|
|
20
|
+
};
|
|
21
|
+
left: {
|
|
22
|
+
after: string;
|
|
23
|
+
before: string;
|
|
24
|
+
};
|
|
25
|
+
right: {
|
|
26
|
+
after: string;
|
|
27
|
+
before: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -16,3 +16,8 @@ export * from "./Modal";
|
|
|
16
16
|
export * from "./Dropdown";
|
|
17
17
|
export * from "./Popover";
|
|
18
18
|
export * from "./BottomSheet";
|
|
19
|
+
export * from './InfiniteSlider';
|
|
20
|
+
export * from './Checkbox';
|
|
21
|
+
export * from './Radio';
|
|
22
|
+
export * from './Pagination';
|
|
23
|
+
export * from './Switch';
|