ddingdong-design-system 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.
Files changed (55) hide show
  1. package/README.md +1 -0
  2. package/dist/App.d.ts +1 -0
  3. package/dist/ddingdong-design-system.es.js +2940 -0
  4. package/dist/ddingdong-design-system.es.js.map +1 -0
  5. package/dist/ddingdong-design-system.umd.js +2 -0
  6. package/dist/ddingdong-design-system.umd.js.map +1 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/shared/constants/motion.d.ts +40 -0
  9. package/dist/shared/hooks/usePortal.d.ts +5 -0
  10. package/dist/shared/index.d.ts +21 -0
  11. package/dist/shared/lib/colors.d.ts +46 -0
  12. package/dist/shared/lib/core.d.ts +2 -0
  13. package/dist/shared/ui/Accordion/Accordion.d.ts +29 -0
  14. package/dist/shared/ui/Accordion/index.d.ts +2 -0
  15. package/dist/shared/ui/Badge/Badge.d.ts +13 -0
  16. package/dist/shared/ui/Badge/index.d.ts +1 -0
  17. package/dist/shared/ui/Button/Button.d.ts +40 -0
  18. package/dist/shared/ui/Button/index.d.ts +1 -0
  19. package/dist/shared/ui/Card/Card.d.ts +13 -0
  20. package/dist/shared/ui/Card/index.d.ts +1 -0
  21. package/dist/shared/ui/DoubleButton/DoubleButton.d.ts +12 -0
  22. package/dist/shared/ui/DoubleButton/index.d.ts +1 -0
  23. package/dist/shared/ui/Drawer/Drawer.d.ts +12 -0
  24. package/dist/shared/ui/Drawer/index.d.ts +1 -0
  25. package/dist/shared/ui/Flex/Flex.d.ts +71 -0
  26. package/dist/shared/ui/Flex/index.d.ts +1 -0
  27. package/dist/shared/ui/Icon/Icon.d.ts +21 -0
  28. package/dist/shared/ui/Icon/index.d.ts +1 -0
  29. package/dist/shared/ui/Modal/Modal.d.ts +20 -0
  30. package/dist/shared/ui/Modal/index.d.ts +1 -0
  31. package/dist/shared/ui/NavBack/NavBack.d.ts +16 -0
  32. package/dist/shared/ui/NavBack/index.d.ts +1 -0
  33. package/dist/shared/ui/Pagination/Pagination.d.ts +20 -0
  34. package/dist/shared/ui/Pagination/index.d.ts +1 -0
  35. package/dist/shared/ui/Portal/Portal.d.ts +12 -0
  36. package/dist/shared/ui/Portal/index.d.ts +1 -0
  37. package/dist/shared/ui/Select/Option.d.ts +10 -0
  38. package/dist/shared/ui/Select/OptionGroupName.d.ts +5 -0
  39. package/dist/shared/ui/Select/OptionList.d.ts +9 -0
  40. package/dist/shared/ui/Select/Select.context.d.ts +12 -0
  41. package/dist/shared/ui/Select/SelectButton.d.ts +8 -0
  42. package/dist/shared/ui/Select/SelectMain.d.ts +26 -0
  43. package/dist/shared/ui/Select/index.d.ts +16 -0
  44. package/dist/shared/ui/Skeleton/Skeleton.d.ts +20 -0
  45. package/dist/shared/ui/Skeleton/index.d.ts +2 -0
  46. package/dist/shared/ui/Switch/Switch.d.ts +11 -0
  47. package/dist/shared/ui/Switch/index.d.ts +1 -0
  48. package/dist/shared/ui/Tabs/Tabs.context.d.ts +5 -0
  49. package/dist/shared/ui/Tabs/TabsItem.d.ts +12 -0
  50. package/dist/shared/ui/Tabs/TabsRoot.d.ts +12 -0
  51. package/dist/shared/ui/Tabs/index.d.ts +2 -0
  52. package/dist/shared/ui/Typography/Typography.d.ts +39 -0
  53. package/dist/shared/ui/Typography/index.d.ts +1 -0
  54. package/dist/shared/ui/assets/index.d.ts +22 -0
  55. package/package.json +111 -0
@@ -0,0 +1,2 @@
1
+ export * from './shared/index'
2
+ export {}
@@ -0,0 +1,40 @@
1
+ export declare const MODAL_MOTION: {
2
+ initial: {
3
+ opacity: number;
4
+ };
5
+ animate: {
6
+ opacity: number;
7
+ };
8
+ exit: {
9
+ opacity: number;
10
+ };
11
+ transition: {
12
+ duration: number;
13
+ };
14
+ };
15
+ export declare const FADE_IN_ANIMATION: {
16
+ initial: {
17
+ opacity: number;
18
+ };
19
+ animate: {
20
+ opacity: number;
21
+ };
22
+ exit: {
23
+ opacity: number;
24
+ };
25
+ };
26
+ export declare const SLIDE_IN_ANIMATION: {
27
+ initial: {
28
+ translateX: string;
29
+ };
30
+ animate: {
31
+ translateX: number;
32
+ };
33
+ exit: {
34
+ translateX: string;
35
+ };
36
+ transition: {
37
+ type: string;
38
+ damping: number;
39
+ };
40
+ };
@@ -0,0 +1,5 @@
1
+ export declare const usePortal: () => {
2
+ isOpen: boolean;
3
+ openModal: () => void;
4
+ closeModal: () => void;
5
+ };
@@ -0,0 +1,21 @@
1
+ export { Accordion } from './ui/Accordion';
2
+ export { Badge } from './ui/Badge';
3
+ export { Button } from './ui/Button';
4
+ export { Card } from './ui/Card';
5
+ export { DoubleButton } from './ui/DoubleButton';
6
+ export { Drawer } from './ui/Drawer';
7
+ export { Flex } from './ui/Flex';
8
+ export { Icon } from './ui/Icon';
9
+ export { Modal } from './ui/Modal';
10
+ export { NavBack } from './ui/NavBack';
11
+ export { Pagination } from './ui/Pagination';
12
+ export { Portal } from './ui/Portal';
13
+ export { Select } from './ui/Select';
14
+ export { Skeleton } from './ui/Skeleton';
15
+ export { Switch } from './ui/Switch';
16
+ export { Tabs } from './ui/Tabs';
17
+ export * from './ui/Typography';
18
+ export * from './ui/assets';
19
+ export * from './lib/colors';
20
+ export * from './lib/core';
21
+ export * from './hooks/usePortal';
@@ -0,0 +1,46 @@
1
+ export declare const colors: {
2
+ primary: {
3
+ 50: string;
4
+ 100: string;
5
+ 200: string;
6
+ 300: string;
7
+ 400: string;
8
+ };
9
+ gray: {
10
+ 50: string;
11
+ 100: string;
12
+ 200: string;
13
+ 300: string;
14
+ 400: string;
15
+ 500: string;
16
+ 600: string;
17
+ };
18
+ red: {
19
+ 50: string;
20
+ 100: string;
21
+ 200: string;
22
+ 300: string;
23
+ };
24
+ green: {
25
+ 50: string;
26
+ 100: string;
27
+ 200: string;
28
+ 300: string;
29
+ };
30
+ orange: string;
31
+ yellow: string;
32
+ purple: string;
33
+ white: string;
34
+ black: string;
35
+ };
36
+ export declare const COLORS: {
37
+ primary: string;
38
+ gray: string;
39
+ red: string;
40
+ green: string;
41
+ black: string;
42
+ };
43
+ export type Colors = keyof typeof colors;
44
+ export type IconColor = keyof typeof COLORS;
45
+ export type SwitchColor = keyof typeof COLORS;
46
+ export declare const colorNames: Colors[];
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare const cn: (...inputs: ClassValue[]) => string;
@@ -0,0 +1,29 @@
1
+ import * as AccordionPrimitives from '@radix-ui/react-accordion';
2
+ type Prop = {
3
+ /**
4
+ * The content of the Accordion, typically AccordionItem components.
5
+ */
6
+ children: React.ReactNode;
7
+ } & (AccordionPrimitives.AccordionSingleProps | AccordionPrimitives.AccordionMultipleProps);
8
+ export declare function AccordionRoot({ children, ...props }: Prop): import("react/jsx-runtime").JSX.Element;
9
+ type ItemProps = {
10
+ /**
11
+ * The trigger element that toggles the visibility of the content.
12
+ */
13
+ trigger: React.ReactNode;
14
+ /**
15
+ * The content that is shown or hidden when the trigger is clicked.
16
+ */
17
+ children: React.ReactNode;
18
+ /**
19
+ * arrow icon to display alongside the trigger.
20
+ * @default true
21
+ */
22
+ isArrow?: boolean;
23
+ /**
24
+ * additional class names to apply to the AccordionItem.
25
+ */
26
+ className?: string;
27
+ } & AccordionPrimitives.AccordionItemProps;
28
+ export declare function AccordionItem({ trigger, className, children, isArrow, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -0,0 +1,2 @@
1
+ export { AccordionRoot as Accordion } from './Accordion';
2
+ export { AccordionItem as Item } from './Accordion';
@@ -0,0 +1,13 @@
1
+ type Props = {
2
+ /**
3
+ * Color type representing the status.
4
+ * @default 'neutral'
5
+ */
6
+ variant: 'positive' | 'negative' | 'neutral';
7
+ /**
8
+ * The text content to be displayed.
9
+ */
10
+ text: string;
11
+ } & React.HTMLAttributes<HTMLDivElement>;
12
+ export declare function Badge({ variant, text, ...props }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ export { Badge } from './Badge';
@@ -0,0 +1,40 @@
1
+ type VariantColorMap = {
2
+ primary: 'red' | 'blue';
3
+ secondary: 'red' | 'blue' | 'green';
4
+ tertiary: never;
5
+ };
6
+ export type ButtonVariant = keyof VariantColorMap;
7
+ type ButtonColor<V extends ButtonVariant> = VariantColorMap[V];
8
+ export type Props<V extends keyof VariantColorMap> = {
9
+ /**
10
+ * variant of the Button.
11
+ */
12
+ variant: V;
13
+ /**
14
+ * color of the Button.
15
+ * @default 'blue'
16
+ */
17
+ color?: ButtonColor<V>;
18
+ /**
19
+ * size of the Button.
20
+ * @default 'medium'
21
+ */
22
+ size?: 'sm' | 'md' | 'lg' | 'full';
23
+ /**
24
+ * loading state of the Button
25
+ * @default false
26
+ */
27
+ isLoading?: boolean;
28
+ /**
29
+ * border-radius option of the Button
30
+ * @default false
31
+ */
32
+ rounded?: boolean;
33
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>;
34
+ export declare const ButtonVariants: (props?: ({
35
+ variant?: "primary" | "secondary" | "tertiary" | null | undefined;
36
+ size?: "sm" | "md" | "lg" | "full" | null | undefined;
37
+ color?: "red" | "green" | "blue" | null | undefined;
38
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
39
+ export declare function Button<V extends ButtonVariant>({ children, variant, color, size, rounded, isLoading, disabled, className, ...props }: Props<V>): import("react/jsx-runtime").JSX.Element;
40
+ export {};
@@ -0,0 +1 @@
1
+ export { Button } from './Button';
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, PropsWithChildren, ElementType } from 'react';
2
+ export type Props<T extends ElementType> = {
3
+ /**
4
+ * The HTML element or React component to render as the root element.
5
+ * @defaults 'div'.
6
+ */
7
+ as?: T;
8
+ /**
9
+ * Additional CSS classNames to be applied to the Card.
10
+ */
11
+ className?: string;
12
+ } & PropsWithChildren<ComponentProps<T>>;
13
+ export declare function Card<T extends ElementType = 'div'>({ as, className, children, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Card } from './Card';
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export type Props = {
3
+ /**
4
+ * left child of the DoubleButton
5
+ */
6
+ left: ReactNode;
7
+ /**
8
+ * right child of the DoubleButton
9
+ */
10
+ right: ReactNode;
11
+ } & React.HTMLAttributes<HTMLDivElement>;
12
+ export declare function DoubleButton({ left, right }: Props): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { DoubleButton } from './DoubleButton';
@@ -0,0 +1,12 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export type Props = {
3
+ /**
4
+ * The open state of the drawer.
5
+ */
6
+ isOpen: boolean;
7
+ /**
8
+ * The function to call when the drawer is closed.
9
+ */
10
+ onClose: () => void;
11
+ } & PropsWithChildren;
12
+ export declare function Drawer({ isOpen, onClose, children }: Props): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Drawer } from './Drawer';
@@ -0,0 +1,71 @@
1
+ declare const DIR: {
2
+ readonly row: "flex-row";
3
+ readonly 'row-reverse': "flex-row-reverse";
4
+ readonly col: "flex-col";
5
+ readonly 'col-reverse': "flex-col-reverse";
6
+ };
7
+ declare const ALIGN_ITEMS: {
8
+ readonly start: "items-start";
9
+ readonly end: "items-end";
10
+ readonly center: "items-center";
11
+ readonly baseline: "items-baseline";
12
+ readonly stretch: "items-stretch";
13
+ };
14
+ declare const JUSTIFY_CONTENT: {
15
+ readonly start: "justify-start";
16
+ readonly end: "justify-end";
17
+ readonly center: "justify-center";
18
+ readonly between: "justify-between";
19
+ readonly around: "justify-around";
20
+ readonly evenly: "justify-evenly";
21
+ readonly stretch: "justify-stretch";
22
+ readonly baseline: "justify-baseline";
23
+ };
24
+ declare const WRAP: {
25
+ readonly nowrap: "flex-nowrap";
26
+ readonly wrap: "flex-wrap";
27
+ readonly 'wrap-reverse': "flex-wrap-reverse";
28
+ };
29
+ type Props = {
30
+ /**
31
+ * The HTML element to use as the container.
32
+ * @default 'div'
33
+ */
34
+ as?: React.ElementType;
35
+ /**
36
+ * Defines the direction of the flex container's main axis.
37
+ * @default row
38
+ */
39
+ dir?: keyof typeof DIR;
40
+ /**
41
+ * Specifies how flex items are aligned along the cross axis.
42
+ * @default start
43
+ */
44
+ alignItems?: keyof typeof ALIGN_ITEMS;
45
+ /**
46
+ * Defines how flex items are distributed along the main axis.
47
+ * @default center
48
+ */
49
+ justifyContent?: keyof typeof JUSTIFY_CONTENT;
50
+ /**
51
+ * Controls whether flex items should wrap onto multiple lines.
52
+ * @default nowrap
53
+ */
54
+ wrap?: keyof typeof WRAP;
55
+ /**
56
+ * Defines the gap between flex items.
57
+ * @default '0px'
58
+ */
59
+ gap?: string;
60
+ /**
61
+ * Additional CSS classNames to be applied to the container.
62
+ * @default ''
63
+ */
64
+ className?: string;
65
+ /**
66
+ * The child elements to be rendered inside the Flex container.
67
+ */
68
+ children: React.ReactNode;
69
+ } & React.HTMLAttributes<HTMLDivElement>;
70
+ export declare function Flex({ as, dir, alignItems, justifyContent, wrap, gap, className, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
71
+ export {};
@@ -0,0 +1 @@
1
+ export { Flex } from './Flex';
@@ -0,0 +1,21 @@
1
+ import { IconColor } from '../../lib/colors';
2
+ import { IconName } from '../assets';
3
+ type Props = {
4
+ /**
5
+ * icon name to be displayed.
6
+ */
7
+ name: IconName;
8
+ /**
9
+ * color of the icon.
10
+ * @default 'gray'
11
+ */
12
+ color?: IconColor;
13
+ /**
14
+ * size of the icon.
15
+ * @description px 단위로 변환합니다.
16
+ * @default 25
17
+ */
18
+ size?: number;
19
+ } & React.SVGProps<SVGSVGElement>;
20
+ export declare function Icon({ name, color, size, ...props }: Props): import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1 @@
1
+ export { Icon } from './Icon';
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ /**
4
+ * Controls whether the modal is open or closed.
5
+ */
6
+ isOpen: boolean;
7
+ /**
8
+ * Function to close the modal.
9
+ */
10
+ closeModal: () => void;
11
+ /**
12
+ * The content to be displayed inside the modal.
13
+ */
14
+ children: ReactNode;
15
+ };
16
+ export declare function Modal({ isOpen, closeModal, children }: Props): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ModalContent({ children }: {
18
+ children: React.ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1 @@
1
+ export { Modal } from './Modal';
@@ -0,0 +1,16 @@
1
+ type Props = {
2
+ /**
3
+ * The title to display in the navigation back button.
4
+ */
5
+ title: string;
6
+ /**
7
+ * The size of the navigation back button.
8
+ */
9
+ size: 'sm' | 'lg';
10
+ /**
11
+ * Callback function to be called when the button is clicked.
12
+ */
13
+ onClick?: () => void;
14
+ };
15
+ export declare function NavBack({ title, size, onClick }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1 @@
1
+ export { NavBack } from './NavBack';
@@ -0,0 +1,20 @@
1
+ type Props = {
2
+ /**
3
+ * current page number.
4
+ */
5
+ currentPage: number;
6
+ /**
7
+ * total page number.
8
+ */
9
+ totalPages: number;
10
+ /**
11
+ * function to be called when page is changed.
12
+ */
13
+ onPageChange: (page: number) => void;
14
+ /**
15
+ * additional className.
16
+ */
17
+ className?: string;
18
+ };
19
+ export declare function Pagination({ currentPage, totalPages, onPageChange, className }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1 @@
1
+ export { Pagination } from './Pagination';
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ /**
3
+ * Controls whether the portal is open or closed.
4
+ */
5
+ isOpen: boolean;
6
+ /**
7
+ * The content to render inside the portal.
8
+ */
9
+ children: React.ReactNode;
10
+ };
11
+ export declare function Portal({ isOpen, children }: Props): import('react').ReactPortal | null;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { Portal } from './Portal';
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const optionVariants: (props?: ({
3
+ size?: "md" | "lg" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ type Props = {
6
+ id: string;
7
+ name: string;
8
+ } & VariantProps<typeof optionVariants>;
9
+ export declare function Option({ id, name, size }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ name: string;
3
+ };
4
+ export declare function OptionGroupName({ name }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const optionListVariants: (props?: ({
3
+ size?: "md" | "lg" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ type Props = {
6
+ children: React.ReactNode;
7
+ } & VariantProps<typeof optionListVariants>;
8
+ export declare function OptionList({ children, size }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ type OptionProps = {
2
+ id: string;
3
+ name: string;
4
+ };
5
+ export type SelectContextType = {
6
+ selected: OptionProps;
7
+ onSelect: (option: OptionProps) => void;
8
+ size: 'md' | 'lg';
9
+ };
10
+ export declare const SelectContext: import('react').Context<SelectContextType | undefined>;
11
+ export declare const useSelectContext: () => SelectContextType;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ selected: string;
3
+ onClick: () => void;
4
+ isOpen: boolean;
5
+ size?: 'md' | 'lg';
6
+ };
7
+ export declare function SelectButton({ selected, onClick, isOpen, size }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ type OptionProps = {
3
+ id: string;
4
+ name: string;
5
+ };
6
+ type Props = {
7
+ /**
8
+ * The size of the select component.
9
+ * @default 'lg'
10
+ */
11
+ size?: 'md' | 'lg';
12
+ /**
13
+ * Callback function called when the selected option changes.
14
+ */
15
+ onChange?: (option: OptionProps) => void;
16
+ /**
17
+ * The default value of the select component.
18
+ */
19
+ defaultValue: string;
20
+ /**
21
+ * The content to be displayed inside the select component.
22
+ */
23
+ children: ReactNode;
24
+ };
25
+ export declare function SelectMain({ children, defaultValue, onChange, size }: Props): import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Option } from './Option';
2
+ import { OptionGroupName } from './OptionGroupName';
3
+ import { OptionList } from './OptionList';
4
+ import { SelectButton } from './SelectButton';
5
+ import { SelectMain } from './SelectMain';
6
+ export declare const Select: typeof SelectMain & {
7
+ Option: typeof Option;
8
+ Button: typeof SelectButton;
9
+ List: typeof OptionList;
10
+ };
11
+ export declare const GroupingSelect: typeof SelectMain & {
12
+ Option: typeof Option;
13
+ Select: typeof SelectButton;
14
+ List: typeof OptionList;
15
+ Group: typeof OptionGroupName;
16
+ };
@@ -0,0 +1,20 @@
1
+ type Props = {
2
+ /**
3
+ * optional additional CSS class names like size etc.
4
+ */
5
+ className?: string;
6
+ } & React.HTMLAttributes<HTMLDivElement>;
7
+ export declare function Skeleton({ className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
8
+ type TextProps = {
9
+ /**
10
+ * optional additional CSS class names like size etc.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * length of text line
15
+ * @default 2
16
+ */
17
+ length?: number;
18
+ } & React.HTMLAttributes<HTMLDivElement>;
19
+ export declare function TextSkeleton({ length, className, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Skeleton } from './Skeleton';
2
+ export { TextSkeleton } from './Skeleton';
@@ -0,0 +1,11 @@
1
+ import { SwitchColor } from '../../lib/colors';
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
3
+ type Props = React.ComponentProps<typeof SwitchPrimitives.Root> & {
4
+ /**
5
+ * color of the switch.
6
+ * @default 'primary'
7
+ */
8
+ color?: SwitchColor;
9
+ };
10
+ export declare function Switch({ color, ...props }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch';
@@ -0,0 +1,5 @@
1
+ type TabsContextType = {
2
+ activeLabel: string;
3
+ };
4
+ export declare const TabsContext: import('react').Context<TabsContextType | undefined>;
5
+ export {};
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ /**
3
+ * tab name to be displayed.
4
+ */
5
+ label: string;
6
+ /**
7
+ * if activated, exposed element.
8
+ */
9
+ children: React.ReactNode;
10
+ } & React.HTMLAttributes<HTMLDivElement>;
11
+ export declare function TabsItem({ label, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ type Props = {
2
+ /**
3
+ * children elements of the Tabs
4
+ */
5
+ children: React.ReactNode;
6
+ /**
7
+ * default focusing tabsItem index.
8
+ */
9
+ defaultIndex?: number;
10
+ } & React.HTMLAttributes<HTMLDivElement>;
11
+ export declare function TabsRoot({ children, defaultIndex, ...props }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ export { TabsRoot as Tabs } from './TabsRoot';
2
+ export { TabsItem as Item } from './TabsItem';