@komensal/ui 0.10.0 → 0.11.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/index.d.ts CHANGED
@@ -9,11 +9,18 @@ import { FieldValues, FieldPath, ControllerProps, Control, Path, FieldError, Noo
9
9
  import * as LabelPrimitive from '@radix-ui/react-label';
10
10
  import { OTPInput } from 'input-otp';
11
11
  import * as PopoverPrimitive from '@radix-ui/react-popover';
12
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
12
13
  import { $NormalizeIntoArray } from './typescript/helpers.js';
13
14
  import { DefaultNamespace, FlatNamespace, InitOptions, InterpolationOptions, Resource, FormatFunction, ResourceKey, ResourceLanguage, TOptions, Namespace, TypeOptions } from './typescript/options.js';
14
15
  import { TFunction, SelectorKey, KeyPrefixSelector, KeyPrefix } from './typescript/t.js';
15
16
  import { ClassValue } from 'clsx';
16
17
 
18
+ interface AddTileProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
19
+ icon: React.ReactNode;
20
+ label: string;
21
+ }
22
+ declare const AddTile: React.ForwardRefExoticComponent<AddTileProps & React.RefAttributes<HTMLButtonElement>>;
23
+
17
24
  interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
18
25
  variant?: AlertVariant;
19
26
  }
@@ -31,7 +38,7 @@ declare const AuthHeader: ({ children, desktopLogoSrc, logoAlt, mobileClassName,
31
38
 
32
39
  declare const buttonVariants: (props?: ({
33
40
  hoverStyle?: "none" | "highlight" | "shine" | null | undefined;
34
- size?: "lg" | "sm" | "default" | "icon" | null | undefined;
41
+ size?: "icon" | "lg" | "sm" | "default" | null | undefined;
35
42
  variant?: "destructive" | "link" | "primary" | "ghost" | "invisible" | "outline" | "subtle" | "tertiary" | "underline" | null | undefined;
36
43
  } & class_variance_authority_types.ClassProp) | undefined) => string;
37
44
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -47,6 +54,13 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
47
54
  }
48
55
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
49
56
 
57
+ declare const chipVariants: (props?: ({
58
+ active?: boolean | null | undefined;
59
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
60
+ interface ChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
61
+ }
62
+ declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLButtonElement>>;
63
+
50
64
  declare const Command: React.ForwardRefExoticComponent<Omit<{
51
65
  children?: React.ReactNode;
52
66
  } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
@@ -70,7 +84,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
70
84
  ref?: React.Ref<HTMLInputElement>;
71
85
  } & {
72
86
  asChild?: boolean;
73
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
87
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
74
88
  value?: string;
75
89
  onValueChange?: (search: string) => void;
76
90
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -96,7 +110,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
96
110
  ref?: React.Ref<HTMLDivElement>;
97
111
  } & {
98
112
  asChild?: boolean;
99
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
113
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
100
114
  heading?: React.ReactNode;
101
115
  value?: string;
102
116
  forceMount?: boolean;
@@ -114,7 +128,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
114
128
  ref?: React.Ref<HTMLDivElement>;
115
129
  } & {
116
130
  asChild?: boolean;
117
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
131
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "disabled" | "value" | "onSelect"> & {
118
132
  disabled?: boolean;
119
133
  onSelect?: (value: string) => void;
120
134
  value?: string;
@@ -372,6 +386,8 @@ interface StepperProps {
372
386
  }
373
387
  declare const Stepper: ({ activeIndex, className, intermediate, steps }: StepperProps) => React.JSX.Element;
374
388
 
389
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
390
+
375
391
  interface ToastOptions {
376
392
  duration?: number;
377
393
  position?: ToastPosition;
@@ -951,4 +967,4 @@ declare const toast: {
951
967
  };
952
968
  declare function registerToastEmitter(fn: ToastEmitter): void;
953
969
 
954
- export { Alert, AuthHeader, Button, type ButtonProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormField, FormItem, FormMessage, GoogleMapPicker, type GoogleMapPickerProps, Input, InputField, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, LabelField, MapPickerField, OTPField, type Options, PasswordChecklist, type PasswordRule, type PasswordRulesConfig, Popover, PopoverContent, PopoverTrigger, type ResolvedAddress, SelectField, SelectInput, Spinner, type SpinnerProps, StepHeader, Stepper, type StepperStep, Toast, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, Tooltip, Wrapper, type WrapperProps, buttonVariants, cn, inputBase, inputCompact, inputDisabled, inputFocus, inputPlaceholder, registerToastEmitter, setUiLanguage, toast, uiI18n, useFormField };
970
+ export { AddTile, type AddTileProps, Alert, AuthHeader, Button, type ButtonProps, Chip, type ChipProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Form, FormControl, FormField, FormItem, FormMessage, GoogleMapPicker, type GoogleMapPickerProps, Input, InputField, InputOTP, InputOTPGroup, InputOTPSlot, type InputProps, Label, LabelField, MapPickerField, OTPField, type Options, PasswordChecklist, type PasswordRule, type PasswordRulesConfig, Popover, PopoverContent, PopoverTrigger, type ResolvedAddress, SelectField, SelectInput, Spinner, type SpinnerProps, StepHeader, Stepper, type StepperStep, Switch, Toast, type ToastOptions, type ToastPosition, ToastProvider, type ToastType, Tooltip, Wrapper, type WrapperProps, buttonVariants, chipVariants, cn, inputBase, inputCompact, inputDisabled, inputFocus, inputPlaceholder, registerToastEmitter, setUiLanguage, toast, uiI18n, useFormField };