kku-ui 0.9.952 → 0.9.981
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/lib/es/components/ui/actions/button/KButton.d.ts +3 -2
- package/lib/es/components/ui/actions/button-group/KButtonGroup.d.ts +2 -1
- package/lib/es/components/ui/input/index.d.ts +1 -0
- package/lib/es/components/ui/input/input/KInput.d.ts +10 -2
- package/lib/es/components/ui/input/input-group/KInputGroup.d.ts +9 -8
- package/lib/es/components/ui/input/number-stepper/KNumberStepper.d.ts +14 -0
- package/lib/es/components/ui/input/textfield/KTextField.d.ts +5 -5
- package/lib/es/components/ui/layout/list-row/KListRow.d.ts +15 -4
- package/lib/es/index.js +2883 -2771
- package/lib/es/index.js.br +0 -0
- package/lib/es/index.js.gz +0 -0
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "outline" | "primary" | "danger" | "
|
|
4
|
+
variant?: "default" | "outline" | "primary" | "danger" | "ghost" | "link" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
6
6
|
width?: "default" | "full" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
8
|
type ButtonVariantsProps = VariantProps<typeof buttonVariants>;
|
|
9
|
+
export type KButtonWidthType = ButtonVariantsProps['width'] | number;
|
|
9
10
|
export interface KButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'width'>, Omit<ButtonVariantsProps, 'width'> {
|
|
10
11
|
asChild?: boolean;
|
|
11
|
-
width?:
|
|
12
|
+
width?: KButtonWidthType;
|
|
12
13
|
}
|
|
13
14
|
declare const KButton: import('react').ForwardRefExoticComponent<KButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
14
15
|
export { KButton, buttonVariants };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { KButtonProps } from '../../..';
|
|
2
|
+
import { KButtonProps, KButtonWidthType } from '../../..';
|
|
3
3
|
export interface KButtonGroupProps extends Pick<KButtonProps, 'variant' | 'size' | 'disabled'> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
vertical?: boolean;
|
|
7
|
+
width?: KButtonWidthType;
|
|
7
8
|
}
|
|
8
9
|
declare const KButtonGroup: {
|
|
9
10
|
(props: KButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
export type KInputSizeType = 'sm' | 'md' | 'lg';
|
|
4
|
+
declare const inputVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface KInputProps extends Omit<ComponentProps<"input">, 'size'>, VariantProps<typeof inputVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const KInput: import('react').ForwardRefExoticComponent<Omit<KInputProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export { KInput, inputVariants };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { KButton } from '../../..';
|
|
4
|
-
declare
|
|
3
|
+
import { KButton, KInputProps } from '../../..';
|
|
4
|
+
declare const inputGroupVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function KInputGroup({ className, size, ...props }: ComponentProps<"div"> & VariantProps<typeof inputGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
declare const inputGroupAddonVariants: (props?: ({
|
|
6
9
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
11
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
12
|
declare function InputGroupAddon({ className, align, ...props }: ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare
|
|
10
|
-
size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
12
|
-
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<ComponentProps<typeof KButton>, "size"> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InputGroupButton({ className, size, variant, ...props }: ComponentProps<typeof KButton>): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
declare function InputGroupText({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare function InputGroupInput({ className, ...props }:
|
|
15
|
+
declare function InputGroupInput({ className, ...props }: KInputProps): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
declare function InputGroupTextarea({ className, ...props }: ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export { KInputGroup, InputGroupAddon,
|
|
17
|
+
export { KInputGroup, InputGroupAddon, InputGroupText, InputGroupButton, InputGroupInput, InputGroupTextarea, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface KNumberStepperProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
declare const KNumberStepper: ({ value: controlledValue, defaultValue, min, max, step, onChange, className, size, style }: KNumberStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { KNumberStepper };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { KInputSizeType } from '../../..';
|
|
4
|
+
declare const textFieldVariants: (props?: ({
|
|
5
5
|
width?: "sm" | "md" | "lg" | "full" | "auto" | "xs" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
7
|
export type KValidationRule = (value: string) => boolean | string | Promise<boolean | string>;
|
|
8
|
-
|
|
9
|
-
export interface KTextFieldProps extends Omit<ComponentProps<'input'>, 'size' | 'width'>, Omit<InputVariantsProps, 'width'> {
|
|
8
|
+
export interface KTextFieldProps extends Omit<ComponentProps<'input'>, 'size' | 'width'> {
|
|
10
9
|
label?: string;
|
|
11
10
|
helperText?: string;
|
|
12
11
|
rules?: KValidationRule[];
|
|
13
|
-
width?:
|
|
12
|
+
width?: VariantProps<typeof textFieldVariants>['width'] | number;
|
|
13
|
+
size?: KInputSizeType;
|
|
14
14
|
}
|
|
15
15
|
export interface KTextFieldRefs {
|
|
16
16
|
validate: () => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type ListGroupWidth =
|
|
2
|
+
export type ListGroupWidth = 'sm' | 'md' | 'lg' | 'auto' | 'full';
|
|
3
3
|
export interface KListGroupProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
header?: string;
|
|
@@ -14,12 +14,23 @@ export interface KListRowProps {
|
|
|
14
14
|
onClick?: () => void;
|
|
15
15
|
className?: string;
|
|
16
16
|
}
|
|
17
|
+
export interface KListRowAccordionProps {
|
|
18
|
+
icon?: ReactNode;
|
|
19
|
+
label: string;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}
|
|
24
|
+
declare const KListGroup: {
|
|
25
|
+
({ children, header, footer, width, className }: KListGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
17
28
|
declare const KListRow: {
|
|
18
29
|
({ icon, label, rightElement, onClick, className, }: KListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
19
30
|
displayName: string;
|
|
20
31
|
};
|
|
21
|
-
declare const
|
|
22
|
-
({
|
|
32
|
+
declare const KListRowAccordion: {
|
|
33
|
+
({ icon, label, children, className, value }: KListRowAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
23
34
|
displayName: string;
|
|
24
35
|
};
|
|
25
|
-
export { KListRow, KListGroup };
|
|
36
|
+
export { KListRow, KListGroup, KListRowAccordion };
|