@easy-ui-react/easy-ui-react 1.4.1 → 1.5.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/dist/components/index.d.ts +1 -0
- package/dist/components/primitives/Button/Button.d.ts +2 -0
- package/dist/components/primitives/Button/Button.types.d.ts +7 -0
- package/dist/components/primitives/Button/ButtonContent.d.ts +7 -0
- package/dist/components/primitives/Button/index.d.ts +2 -0
- package/dist/components/primitives/index.d.ts +2 -0
- package/dist/components/primitives/spinners/Spinner/Spinner.d.ts +2 -0
- package/dist/components/primitives/spinners/Spinner/Spinner.types.d.ts +4 -0
- package/dist/components/primitives/spinners/Spinner/index.d.ts +2 -0
- package/dist/config/easyui.config.types.d.ts +8 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useSlotClassNames.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/providers/EasyUIContext.d.ts +3 -0
- package/dist/providers/EasyUIProvider.d.ts +5 -0
- package/dist/providers/EasyUIProvider.types.d.ts +7 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/types/base.d.ts +23 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/variants.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './primitives';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { EasyUIBaseProps, WithContentProps, WithLabelProps, WithVariantProps } from '../../../types/base';
|
|
3
|
+
export type ButtonSlots = 'base' | 'startContent' | 'endContent' | 'text' | 'spinner' | 'label' | 'description';
|
|
4
|
+
export interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'color'>, EasyUIBaseProps<ButtonSlots>, WithContentProps, WithVariantProps, WithLabelProps {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonSlots } from '../components';
|
|
2
|
+
export interface EasyUIWrappersConfig {
|
|
3
|
+
button?: Partial<Record<ButtonSlots, string>>;
|
|
4
|
+
}
|
|
5
|
+
export interface EasyUIConfig {
|
|
6
|
+
wrappers?: EasyUIWrappersConfig;
|
|
7
|
+
}
|
|
8
|
+
export declare function defineConfig(config: EasyUIConfig): EasyUIConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSlotClassNames } from './useSlotClassNames';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { EasyUIWrappersConfig } from '../config/easyui.config.types';
|
|
2
|
+
export declare function useSlotClassNames<TComponent extends keyof EasyUIWrappersConfig>(component: TComponent, classNames?: EasyUIWrappersConfig[TComponent]): (slot: keyof NonNullable<EasyUIWrappersConfig[TComponent]> & string) => string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface EasyUIBaseProps<TSlots extends string = string> {
|
|
3
|
+
size?: 'sm' | 'md' | 'lg';
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
classNames?: Partial<Record<TSlots, string>>;
|
|
7
|
+
}
|
|
8
|
+
export interface WithContentProps {
|
|
9
|
+
startContent?: ReactNode;
|
|
10
|
+
endContent?: ReactNode;
|
|
11
|
+
startContentPlacement?: 'outside' | 'inside';
|
|
12
|
+
endContentPlacement?: 'outside' | 'inside';
|
|
13
|
+
}
|
|
14
|
+
export interface WithVariantProps {
|
|
15
|
+
variant?: 'solid' | 'outlined' | 'flat' | 'light';
|
|
16
|
+
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
17
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
18
|
+
}
|
|
19
|
+
export interface WithLabelProps {
|
|
20
|
+
label?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
descriptionPlacement?: 'label' | 'element';
|
|
23
|
+
}
|