@anker-in/headless-ui 0.0.17 → 0.0.18
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/dist/cjs/components/button.d.ts +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/checkbox.d.ts +1 -1
- package/dist/cjs/components/heading.d.ts +1 -1
- package/dist/cjs/components/input.d.ts +1 -1
- package/dist/cjs/components/radio.d.ts +1 -1
- package/dist/cjs/components/text.d.ts +1 -1
- package/dist/cjs/icons/spinner.d.ts +2 -4
- package/dist/cjs/icons/spinner.js +1 -1
- package/dist/cjs/icons/spinner.js.map +3 -3
- package/dist/cjs/src/components/badge.d.ts +9 -0
- package/dist/cjs/src/components/button.d.ts +20 -0
- package/dist/cjs/src/components/checkbox.d.ts +11 -0
- package/dist/cjs/src/components/dialog.d.ts +19 -0
- package/dist/cjs/src/components/heading.d.ts +16 -0
- package/dist/cjs/src/components/index.d.ts +12 -0
- package/dist/cjs/src/components/input.d.ts +22 -0
- package/dist/cjs/src/components/popover.d.ts +6 -0
- package/dist/cjs/src/components/radio.d.ts +16 -0
- package/dist/cjs/src/components/skeleton.d.ts +9 -0
- package/dist/cjs/src/components/text.d.ts +31 -0
- package/dist/cjs/src/components/theme.d.ts +13 -0
- package/dist/cjs/src/helpers/component-props.d.ts +7 -0
- package/dist/cjs/src/helpers/constants.d.ts +2 -0
- package/dist/cjs/src/helpers/index.d.ts +1 -0
- package/dist/cjs/src/helpers/utils.d.ts +2 -0
- package/dist/cjs/src/icons/spinner.d.ts +5 -0
- package/dist/cjs/src/index.d.ts +1 -0
- package/dist/cjs/src/stories/badge.stories.d.ts +26 -0
- package/dist/cjs/src/stories/button.stories.d.ts +47 -0
- package/dist/cjs/src/stories/checkbox.stories.d.ts +46 -0
- package/dist/cjs/src/stories/dialog.stories.d.ts +20 -0
- package/dist/cjs/src/stories/heading.stories.d.ts +82 -0
- package/dist/cjs/src/stories/input.stories.d.ts +35 -0
- package/dist/cjs/src/stories/popover.stories.d.ts +17 -0
- package/dist/cjs/src/stories/radio.stories.d.ts +39 -0
- package/dist/cjs/src/stories/skeleton.stories.d.ts +20 -0
- package/dist/cjs/src/stories/text.stories.d.ts +84 -0
- package/dist/cjs/tests/badge.test.d.ts +1 -0
- package/dist/cjs/tests/button.test.d.ts +1 -0
- package/dist/cjs/tests/heading.test.d.ts +1 -0
- package/dist/cjs/tests/input.test.d.ts +1 -0
- package/dist/cjs/tests/jest.setup.d.ts +1 -0
- package/dist/cjs/tests/text.test.d.ts +1 -0
- package/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/components/button.d.ts +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +3 -3
- package/dist/esm/components/checkbox.d.ts +1 -1
- package/dist/esm/components/heading.d.ts +1 -1
- package/dist/esm/components/input.d.ts +1 -1
- package/dist/esm/components/radio.d.ts +1 -1
- package/dist/esm/components/text.d.ts +1 -1
- package/dist/esm/icons/spinner.d.ts +2 -4
- package/dist/esm/icons/spinner.js +1 -1
- package/dist/esm/icons/spinner.js.map +3 -3
- package/dist/esm/src/components/badge.d.ts +9 -0
- package/dist/esm/src/components/button.d.ts +20 -0
- package/dist/esm/src/components/checkbox.d.ts +11 -0
- package/dist/esm/src/components/dialog.d.ts +19 -0
- package/dist/esm/src/components/heading.d.ts +16 -0
- package/dist/esm/src/components/index.d.ts +12 -0
- package/dist/esm/src/components/input.d.ts +22 -0
- package/dist/esm/src/components/popover.d.ts +6 -0
- package/dist/esm/src/components/radio.d.ts +16 -0
- package/dist/esm/src/components/skeleton.d.ts +9 -0
- package/dist/esm/src/components/text.d.ts +31 -0
- package/dist/esm/src/components/theme.d.ts +13 -0
- package/dist/esm/src/helpers/component-props.d.ts +7 -0
- package/dist/esm/src/helpers/constants.d.ts +2 -0
- package/dist/esm/src/helpers/index.d.ts +1 -0
- package/dist/esm/src/helpers/utils.d.ts +2 -0
- package/dist/esm/src/icons/spinner.d.ts +5 -0
- package/dist/esm/src/index.d.ts +1 -0
- package/dist/esm/src/stories/badge.stories.d.ts +26 -0
- package/dist/esm/src/stories/button.stories.d.ts +47 -0
- package/dist/esm/src/stories/checkbox.stories.d.ts +46 -0
- package/dist/esm/src/stories/dialog.stories.d.ts +20 -0
- package/dist/esm/src/stories/heading.stories.d.ts +82 -0
- package/dist/esm/src/stories/input.stories.d.ts +35 -0
- package/dist/esm/src/stories/popover.stories.d.ts +17 -0
- package/dist/esm/src/stories/radio.stories.d.ts +39 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +20 -19
- package/src/components/button.tsx +16 -1
- package/src/icons/spinner.tsx +5 -6
- package/src/styles/global.css +1 -1
- package/style.css +10 -1
- package/src/.DS_Store +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime.js").JSX.Element;
|
|
9
|
+
export default Badge;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Button Variants
|
|
5
|
+
*/
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "link" | "primary" | "secondary" | "ghost" | null | undefined;
|
|
8
|
+
size?: "sm" | "base" | "lg" | "icon" | null | undefined;
|
|
9
|
+
hoverEffect?: "none" | "slide" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
11
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
12
|
+
/** 设置按钮载入状态 */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** 设置按钮失效状态 */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** 定义自组件作为父组件的类型, 详细使用方式请参考radix-ui */
|
|
17
|
+
asChild?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export default Button;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const checkboxVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
+
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export default Checkbox;
|
|
11
|
+
export type { CheckboxProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime.js").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const headingVariants: (props?: ({
|
|
4
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
5
|
+
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
6
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
8
|
+
interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps<typeof headingVariants> {
|
|
9
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
html?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
export { Heading };
|
|
16
|
+
export type { HeadingProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as Button } from './button.js';
|
|
2
|
+
export { default as Badge } from './badge.js';
|
|
3
|
+
export * from './input.js';
|
|
4
|
+
export { default as Checkbox } from './checkbox.js';
|
|
5
|
+
export { default as Skeleton } from './skeleton.js';
|
|
6
|
+
export * from './dialog.js';
|
|
7
|
+
export * from './popover.js';
|
|
8
|
+
export * from './radio.js';
|
|
9
|
+
export * from './dialog.js';
|
|
10
|
+
export * from './text.js';
|
|
11
|
+
export * from './heading.js';
|
|
12
|
+
export { default as Theme } from './theme.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const inputVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
+
export interface InputProps extends ComponentPropsWithout<'input', 'size'>, VariantProps<typeof inputVariants> {
|
|
8
|
+
}
|
|
9
|
+
interface InputSlotProps extends ComponentPropsWithout<'div', RemovedProps> {
|
|
10
|
+
/**
|
|
11
|
+
* 插槽的位置
|
|
12
|
+
* default: right
|
|
13
|
+
*/
|
|
14
|
+
side?: 'left' | 'right';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* InputSlot
|
|
18
|
+
* 用来在 Input 组件中插入额外的内容,比如icon ,按钮
|
|
19
|
+
*/
|
|
20
|
+
declare const InputSlot: React.ForwardRefExoticComponent<InputSlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
export { Input, InputSlot };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
declare const radioGroupVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "base" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
7
|
+
interface RadioGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
8
|
+
/** 尺寸 */
|
|
9
|
+
size?: 'sm' | 'base' | 'lg';
|
|
10
|
+
}
|
|
11
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, VariantProps<typeof radioGroupVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export { RadioGroup, RadioGroupItem };
|
|
16
|
+
export type { RadioGroupProps, RadioGroupItemProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
3
|
+
interface SkeletonProps extends ComponentPropsWithout<'span', RemovedProps> {
|
|
4
|
+
/** 是否正在加载 , 默认是true*/
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export default Skeleton;
|
|
9
|
+
export type { SkeletonProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
4
|
+
declare const textVariants: (props?: ({
|
|
5
|
+
size?: 1 | "none" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
|
|
6
|
+
weights?: "bold" | "light" | "normal" | "medium" | null | undefined;
|
|
7
|
+
align?: "center" | "left" | "right" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
|
|
9
|
+
type TextSpanProps = {
|
|
10
|
+
as?: 'span';
|
|
11
|
+
} & ComponentPropsWithout<'span', RemovedProps>;
|
|
12
|
+
type TextDivProps = {
|
|
13
|
+
as: 'div';
|
|
14
|
+
} & ComponentPropsWithout<'div', RemovedProps>;
|
|
15
|
+
type TextLabelProps = {
|
|
16
|
+
as: 'label';
|
|
17
|
+
} & ComponentPropsWithout<'label', RemovedProps>;
|
|
18
|
+
type TextPProps = {
|
|
19
|
+
as: 'p';
|
|
20
|
+
} & ComponentPropsWithout<'p', RemovedProps>;
|
|
21
|
+
interface CommonTextProps extends VariantProps<typeof textVariants> {
|
|
22
|
+
as?: 'div' | 'label' | 'p' | 'span';
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
color?: string;
|
|
25
|
+
/** 相当于 dangerouslySetInnerHTML */
|
|
26
|
+
html?: string;
|
|
27
|
+
}
|
|
28
|
+
type TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);
|
|
29
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
export { Text };
|
|
31
|
+
export type { TextProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Brand } from '../helpers/constants.js';
|
|
3
|
+
interface ThemeProps {
|
|
4
|
+
brand: Brand;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param param
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
declare const Theme: ({ brand, children }: ThemeProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
+
export default Theme;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type ComponentPropsAs<C extends React.ElementType<any>, T extends React.ComponentPropsWithoutRef<C>['as']> = Omit<Extract<React.ComponentPropsWithoutRef<C>, {
|
|
3
|
+
as: T;
|
|
4
|
+
}>, 'as' | 'asChild'>;
|
|
5
|
+
type ComponentPropsWithout<T extends React.ElementType, O extends Omit<string, keyof React.ComponentPropsWithoutRef<T>> | keyof React.ComponentPropsWithoutRef<T>> = Omit<React.ComponentPropsWithoutRef<T>, O & string>;
|
|
6
|
+
type RemovedProps = 'asChild' | 'defaultChecked' | 'defaultValue' | 'color';
|
|
7
|
+
export type { ComponentPropsAs, ComponentPropsWithout, RemovedProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from './utils.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Badge } from '../components/index';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Badge;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "select";
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
variant: "default";
|
|
20
|
+
children: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const Examples: Story;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/button").ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
variant: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "select";
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
size: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "select";
|
|
20
|
+
};
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
hoverEffect: {
|
|
24
|
+
description: string;
|
|
25
|
+
control: {
|
|
26
|
+
type: "select";
|
|
27
|
+
};
|
|
28
|
+
options: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
args: {
|
|
32
|
+
variant: "primary";
|
|
33
|
+
size: "base";
|
|
34
|
+
children: string;
|
|
35
|
+
asChild: false;
|
|
36
|
+
disabled: false;
|
|
37
|
+
loading: false;
|
|
38
|
+
hoverEffect: "none";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<typeof meta>;
|
|
43
|
+
export declare const Primary: Story;
|
|
44
|
+
export declare const Secondary: Story;
|
|
45
|
+
export declare const Link: Story;
|
|
46
|
+
export declare const WithIcon: Story;
|
|
47
|
+
export declare const Aschild: Story;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/checkbox").CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
args: {
|
|
30
|
+
size: "base";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
type Story = StoryObj<typeof meta>;
|
|
35
|
+
export declare const Default: Story;
|
|
36
|
+
export declare const Sizes: {
|
|
37
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
parameters: {
|
|
39
|
+
docs: {
|
|
40
|
+
description: {
|
|
41
|
+
story: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const Disabled: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog } from '../components/index';
|
|
3
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("@radix-ui/react-dialog").DialogProps>;
|
|
7
|
+
subcomponents: any;
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof Dialog>;
|
|
20
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("../components/heading").HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
argTypes: {
|
|
16
|
+
size: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "select";
|
|
19
|
+
};
|
|
20
|
+
options: (string | number)[];
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
weights: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "select";
|
|
31
|
+
};
|
|
32
|
+
options: string[];
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
align: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "select";
|
|
42
|
+
};
|
|
43
|
+
options: string[];
|
|
44
|
+
table: {
|
|
45
|
+
defaultValue: {
|
|
46
|
+
summary: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
color: {
|
|
51
|
+
control: {
|
|
52
|
+
type: "color";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
as: {
|
|
56
|
+
control: {
|
|
57
|
+
type: "select";
|
|
58
|
+
};
|
|
59
|
+
options: string[];
|
|
60
|
+
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: {
|
|
63
|
+
summary: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
html: {
|
|
68
|
+
type: "string";
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
args: {
|
|
73
|
+
as: "h1";
|
|
74
|
+
size: "none";
|
|
75
|
+
weights: "normal";
|
|
76
|
+
align: "left";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
type Story = StoryObj<typeof meta>;
|
|
81
|
+
export declare const Default: Story;
|
|
82
|
+
export declare const All: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import type { ComponentType } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("../components/input").InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
subcomponents: {
|
|
8
|
+
InputSlot: ComponentType<unknown>;
|
|
9
|
+
};
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
tags: string[];
|
|
19
|
+
argTypes: {
|
|
20
|
+
size: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select";
|
|
23
|
+
};
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
args: {
|
|
28
|
+
size: "base";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const Default: Story;
|
|
34
|
+
export declare const WithButton: Story;
|
|
35
|
+
export declare const WithIcon: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: React.FC<import("@radix-ui/react-popover").PopoverProps>;
|
|
5
|
+
subcomponents: any;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { RadioGroup } from '../components/index';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("../components/radio").RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
subcomponents: {
|
|
8
|
+
RadioGroupItem: React.ComponentType<unknown>;
|
|
9
|
+
};
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
tags: string[];
|
|
19
|
+
argTypes: {
|
|
20
|
+
size: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select";
|
|
23
|
+
};
|
|
24
|
+
options: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
table: {
|
|
27
|
+
defaultValue: {
|
|
28
|
+
summary: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
args: {
|
|
34
|
+
size: "base";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<typeof RadioGroup>;
|
|
39
|
+
export declare const Default: Story;
|