@aciole/acyon 0.0.2 → 0.0.3
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/acyon.cjs.js +2 -2
- package/dist/acyon.cjs.js.map +1 -1
- package/dist/acyon.css +1 -1
- package/dist/acyon.es.js +978 -826
- package/dist/acyon.es.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +4 -0
- package/dist/components/Alert/types.d.ts +8 -0
- package/dist/components/Avatar/types.d.ts +1 -1
- package/dist/components/Badge/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts +2 -2
- package/dist/components/Container/types.d.ts +1 -1
- package/dist/components/Drawer/types.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +7 -0
- package/dist/components/Dropdown/types.d.ts +22 -0
- package/dist/components/IconButton/types.d.ts +1 -1
- package/dist/components/Image/types.d.ts +2 -2
- package/dist/components/Input/types.d.ts +2 -2
- package/dist/components/Loader/types.d.ts +1 -1
- package/dist/components/Modal/types.d.ts +1 -1
- package/dist/components/Progress/types.d.ts +1 -1
- package/dist/components/Select/types.d.ts +1 -1
- package/dist/components/Skeleton/types.d.ts +2 -4
- package/dist/components/Switch/types.d.ts +1 -1
- package/dist/components/Tabs/types.d.ts +1 -1
- package/dist/components/Tag/types.d.ts +1 -1
- package/dist/components/TextArea/types.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/utils/styleTokens.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type AlertVariant = 'primary' | 'neutral' | 'success' | 'warning' | 'error';
|
|
3
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: AlertVariant;
|
|
5
|
+
title?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
export type AvatarSize = '
|
|
2
|
+
export type AvatarSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
|
|
3
3
|
export type AvatarStatus = 'online' | 'offline' | 'away' | 'busy';
|
|
4
4
|
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
src?: string;
|
|
@@ -2,7 +2,7 @@ import { ColorValue, TokenSize } from '../../utils/styleTokens';
|
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export type BadgeVariant = 'solid' | 'outline' | 'soft';
|
|
4
4
|
export type BadgeColor = ColorValue;
|
|
5
|
-
export type BadgeSize = Extract<TokenSize, '
|
|
5
|
+
export type BadgeSize = Extract<TokenSize, 'small' | 'medium' | 'large'>;
|
|
6
6
|
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
7
7
|
variant?: BadgeVariant;
|
|
8
8
|
color?: BadgeColor;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ColorValue } from '../../utils/styleTokens';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export type ButtonVariant = 'solid' | 'soft' | 'ghost' | 'outline';
|
|
4
|
-
export type ButtonSize = '
|
|
5
|
-
export type ButtonColor = ColorValue
|
|
4
|
+
export type ButtonSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
|
|
5
|
+
export type ButtonColor = ColorValue;
|
|
6
6
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
7
|
variant?: ButtonVariant;
|
|
8
8
|
size?: ButtonSize;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
export type ContainerSize = '
|
|
2
|
+
export type ContainerSize = 'small' | 'medium' | 'large' | 'extraLarge' | 'full';
|
|
3
3
|
export interface ContainerProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
size?: ContainerSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
export type DrawerPlacement = 'left' | 'right';
|
|
3
|
-
export type DrawerSize = '
|
|
3
|
+
export type DrawerSize = 'small' | 'medium' | 'large' | 'full';
|
|
4
4
|
export interface DrawerProps {
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
onClose: () => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownItemProps, DropdownProps } from './types';
|
|
2
|
+
export type { DropdownItemProps, DropdownPlacement, DropdownProps } from './types';
|
|
3
|
+
declare function DropdownRoot({ children, content, open, defaultOpen, onOpenChange, placement, offset, disabled, matchTriggerWidth, closeOnClickOutside, className, ...props }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownItem({ children, className, inset, destructive, keepOpen, leftContent, rightContent, onClick, onSelect, ...props }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Dropdown: typeof DropdownRoot & {
|
|
6
|
+
Item: typeof DropdownItem;
|
|
7
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type DropdownPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
3
|
+
export interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'content'> {
|
|
4
|
+
children: React.ReactElement;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
placement?: DropdownPlacement;
|
|
10
|
+
offset?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
matchTriggerWidth?: boolean;
|
|
13
|
+
closeOnClickOutside?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DropdownItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
destructive?: boolean;
|
|
18
|
+
keepOpen?: boolean;
|
|
19
|
+
leftContent?: React.ReactNode;
|
|
20
|
+
rightContent?: React.ReactNode;
|
|
21
|
+
onSelect?: () => void;
|
|
22
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps, ButtonSize, ButtonVariant } from '../Button/types';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export type IconButtonVariant = ButtonVariant;
|
|
4
|
-
export type IconButtonSize = Extract<ButtonSize, '
|
|
4
|
+
export type IconButtonSize = Extract<ButtonSize, 'small' | 'medium' | 'large'>;
|
|
5
5
|
export interface IconButtonProps extends Omit<ButtonProps, 'children' | 'leftIcon' | 'rightIcon'> {
|
|
6
6
|
icon: React.ReactNode | JSX.Element;
|
|
7
7
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
export type ImageObjectFit = 'cover' | 'contain' | 'fill' | 'none' | '
|
|
3
|
-
export type ImageRadius = '
|
|
2
|
+
export type ImageObjectFit = 'cover' | 'contain' | 'fill' | 'none' | 'scaleDown';
|
|
3
|
+
export type ImageRadius = 'small' | 'medium' | 'large' | 'full';
|
|
4
4
|
export interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
5
5
|
objectFit?: ImageObjectFit;
|
|
6
6
|
radius?: ImageRadius;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
export type InputSize = '
|
|
2
|
+
export type InputSize = 'small' | 'medium' | 'large';
|
|
3
3
|
export interface InputProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'prefix' | 'suffix'> {
|
|
4
4
|
label?: string;
|
|
5
5
|
error?: string;
|
|
6
|
-
|
|
6
|
+
hint?: string;
|
|
7
7
|
prefix?: React.ReactNode;
|
|
8
8
|
suffix?: React.ReactNode;
|
|
9
9
|
clearable?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorValue } from '../../utils/styleTokens';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
export type ProgressSize = '
|
|
3
|
+
export type ProgressSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
value: number;
|
|
6
6
|
max?: number;
|
|
@@ -5,7 +5,7 @@ export interface SelectOption {
|
|
|
5
5
|
searchValue?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export type SelectSize = '
|
|
8
|
+
export type SelectSize = 'small' | 'medium' | 'large';
|
|
9
9
|
export interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
10
10
|
options: SelectOption[];
|
|
11
11
|
value?: string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
export interface SkeletonProps {
|
|
3
2
|
width?: string | number;
|
|
4
3
|
height?: string | number;
|
|
5
|
-
circle?: boolean;
|
|
6
|
-
radius?: string | number;
|
|
7
4
|
animated?: boolean;
|
|
5
|
+
rounded?: boolean;
|
|
8
6
|
}
|
|
@@ -7,7 +7,7 @@ export interface TabItem {
|
|
|
7
7
|
href?: string;
|
|
8
8
|
}
|
|
9
9
|
export type TabsVariant = 'default' | 'pills';
|
|
10
|
-
export type TabsSize = '
|
|
10
|
+
export type TabsSize = 'small' | 'medium' | 'large';
|
|
11
11
|
export interface TabsProps {
|
|
12
12
|
tabs: TabItem[];
|
|
13
13
|
defaultValue?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColorValue, TokenSize } from '../../utils/styleTokens';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
export type TagVariant = 'soft' | 'outline';
|
|
4
|
-
export type TagSize = Extract<TokenSize, '
|
|
4
|
+
export type TagSize = Extract<TokenSize, 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge'>;
|
|
5
5
|
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
6
6
|
variant?: TagVariant;
|
|
7
7
|
size?: TagSize;
|
|
@@ -3,7 +3,7 @@ export type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
|
3
3
|
export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
4
|
label?: string;
|
|
5
5
|
error?: string;
|
|
6
|
-
|
|
6
|
+
hint?: string;
|
|
7
7
|
full?: boolean;
|
|
8
8
|
resize?: TextAreaResize;
|
|
9
9
|
}
|
|
@@ -7,6 +7,7 @@ export * from './Search/Search';
|
|
|
7
7
|
export * from './DatePicker/DatePicker';
|
|
8
8
|
export * from './Select/Select';
|
|
9
9
|
export * from './MultiSelect/MultiSelect';
|
|
10
|
+
export * from './Dropdown/Dropdown';
|
|
10
11
|
export * from './Checkbox/Checkbox';
|
|
11
12
|
export * from './Radio/Radio';
|
|
12
13
|
export * from './Slider/Slider';
|
|
@@ -25,6 +26,7 @@ export * from './Heading/Heading';
|
|
|
25
26
|
export * from './Code/Code';
|
|
26
27
|
export * from './Link/Link';
|
|
27
28
|
export * from './Badge/Badge';
|
|
29
|
+
export * from './Alert/Alert';
|
|
28
30
|
export * from './Tag/Tag';
|
|
29
31
|
export * from './Avatar/Avatar';
|
|
30
32
|
export * from './Image/Image';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LooseStringUnion } from '../components/types';
|
|
2
|
-
export type TokenColor = 'primary' | '
|
|
2
|
+
export type TokenColor = 'primary' | 'neutral' | 'success' | 'warning' | 'error';
|
|
3
3
|
export type ColorValue = LooseStringUnion<TokenColor>;
|
|
4
|
-
export type TokenTextColor = LooseStringUnion<TokenColor | 'default' | '
|
|
4
|
+
export type TokenTextColor = LooseStringUnion<TokenColor | 'default' | 'inverse' | 'disabled'>;
|
|
5
5
|
export type TokenIconColor = LooseStringUnion<TokenColor | 'default' | 'disabled'>;
|
|
6
|
-
export type TokenSize = '
|
|
6
|
+
export type TokenSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';
|
|
7
7
|
export type TokenWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
8
8
|
export declare function isTokenColor(color?: string): color is TokenColor;
|
|
9
9
|
export declare function colorVar(color?: ColorValue): string | undefined;
|