kku-ui 0.9.94 → 0.9.951

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.
@@ -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?: "default" | "sm" | "lg" | null | undefined;
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 type KSelectRule<T = KSelectValue> = (value: T) => boolean | string | Promise<boolean | string>;
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
- helperText?: string;
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 };