kku-ui 0.9.94 → 0.9.96
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/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 +2 -2
- package/lib/es/components/ui/input/number-stepper/KNumberStepper.d.ts +14 -0
- package/lib/es/components/ui/input/select/KSelect.d.ts +5 -15
- package/lib/es/components/ui/input/textfield/KTextField.d.ts +5 -3
- package/lib/es/components/ui/layout/index.d.ts +1 -0
- package/lib/es/components/ui/layout/list-row/KListRow.d.ts +36 -0
- package/lib/es/index.js +3338 -3174
- 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 +2 -1
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { KButton } from '../../..';
|
|
3
|
+
import { KButton, KInputProps } from '../../..';
|
|
4
4
|
declare function KInputGroup({ className, ...props }: ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const inputGroupAddonVariants: (props?: ({
|
|
6
6
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
@@ -11,6 +11,6 @@ declare const inputGroupButtonVariants: (props?: ({
|
|
|
11
11
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
12
12
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<ComponentProps<typeof KButton>, "size"> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare function InputGroupText({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare function InputGroupInput({ className, ...props }:
|
|
14
|
+
declare function InputGroupInput({ className, ...props }: KInputProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare function InputGroupTextarea({ className, ...props }: ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export { KInputGroup, InputGroupAddon, InputGroupButton, InputGroupText, 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 };
|
|
@@ -2,7 +2,7 @@ import { ComponentPropsWithoutRef } from 'react';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
4
|
declare const selectVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
width?: "sm" | "md" | "lg" | "full" | "auto" | "xs" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
8
|
export type KSelectValue = string;
|
|
@@ -11,28 +11,18 @@ export type KSelectOption = {
|
|
|
11
11
|
value: KSelectValue;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
15
|
-
export interface KSelectProps extends Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, 'onValueChange'>, VariantProps<typeof selectVariants> {
|
|
16
|
-
label?: string;
|
|
14
|
+
export interface KSelectProps extends Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, 'onValueChange'>, Omit<VariantProps<typeof selectVariants>, 'width'> {
|
|
17
15
|
options: KSelectOption[];
|
|
18
|
-
|
|
19
|
-
rules?: KSelectRule<KSelectValue>[];
|
|
16
|
+
selectLabel?: string;
|
|
20
17
|
placeholder?: string;
|
|
21
18
|
className?: string;
|
|
22
19
|
id?: string;
|
|
23
|
-
required?: boolean;
|
|
24
20
|
onChange?: (value: KSelectValue) => void;
|
|
21
|
+
error?: boolean;
|
|
22
|
+
width?: VariantProps<typeof selectVariants>['width'] | number;
|
|
25
23
|
}
|
|
26
24
|
export interface KSelectRefs {
|
|
27
|
-
validate: () => Promise<boolean>;
|
|
28
|
-
reset: () => void;
|
|
29
25
|
value: KSelectValue | undefined;
|
|
30
26
|
}
|
|
31
|
-
export interface KSelectTriggerProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
|
|
32
|
-
}
|
|
33
|
-
export interface KSelectContentProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {
|
|
34
|
-
}
|
|
35
|
-
export interface KSelectItemProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {
|
|
36
|
-
}
|
|
37
27
|
declare const KSelect: import('react').ForwardRefExoticComponent<KSelectProps & import('react').RefAttributes<KSelectRefs>>;
|
|
38
28
|
export { KSelect };
|
|
@@ -1,14 +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
|
-
export interface KTextFieldProps extends Omit<ComponentProps<'input'>, 'size' | 'width'
|
|
8
|
+
export interface KTextFieldProps extends Omit<ComponentProps<'input'>, 'size' | 'width'> {
|
|
9
9
|
label?: string;
|
|
10
10
|
helperText?: string;
|
|
11
11
|
rules?: KValidationRule[];
|
|
12
|
+
width?: VariantProps<typeof textFieldVariants>['width'] | number;
|
|
13
|
+
size?: KInputSizeType;
|
|
12
14
|
}
|
|
13
15
|
export interface KTextFieldRefs {
|
|
14
16
|
validate: () => Promise<boolean>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ListGroupWidth = 'sm' | 'md' | 'lg' | 'auto' | 'full';
|
|
3
|
+
export interface KListGroupProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
header?: string;
|
|
6
|
+
footer?: string;
|
|
7
|
+
width?: ListGroupWidth;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface KListRowProps {
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
label: string;
|
|
13
|
+
rightElement?: ReactNode;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
className?: string;
|
|
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
|
+
};
|
|
28
|
+
declare const KListRow: {
|
|
29
|
+
({ icon, label, rightElement, onClick, className, }: KListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
declare const KListRowAccordion: {
|
|
33
|
+
({ icon, label, children, className, value }: KListRowAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export { KListRow, KListGroup, KListRowAccordion };
|