@qodo/design-system 0.17.5 → 0.18.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
@@ -1,5 +1,7 @@
1
1
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
2
  import { ButtonProps as ButtonProps_2 } from '..';
3
+ import { CheckboxGroupProps as CheckboxGroupProps_2 } from './types';
4
+ import { CheckboxProps as CheckboxProps_2 } from '..';
3
5
  import { ClassProp } from 'class-variance-authority/types';
4
6
  import { ClassValue } from 'clsx';
5
7
  import { Column } from '@tanstack/react-table';
@@ -164,6 +166,25 @@ export declare function CardHeader({ className, ...props }: React_2.ComponentPro
164
166
 
165
167
  export declare function CardTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX_2.Element;
166
168
 
169
+ export declare const Checkbox: {
170
+ ({ disabled, error, name, checked, onCheckedChange, label, description, labelWrapperClassName, labelClassName, descriptionClassName, checkboxClassName, wrapperClassName, }: React.PropsWithChildren<CheckboxProps>): JSX_2.Element;
171
+ displayName: string;
172
+ };
173
+
174
+ export declare const CheckboxGroup: default_2.ForwardRefExoticComponent<CheckboxGroupProps & default_2.RefAttributes<HTMLDivElement>>;
175
+
176
+ export declare interface CheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
177
+ value?: string[];
178
+ defaultValue?: string[];
179
+ onValueChange?: (value: string[]) => void;
180
+ disabled?: boolean;
181
+ readOnly?: boolean;
182
+ className?: string;
183
+ error?: boolean;
184
+ name: string;
185
+ direction?: "horizontal" | "vertical";
186
+ }
187
+
167
188
  declare interface CheckboxGroupType extends TypeGuard<"CheckboxGroup"> {
168
189
  checkboxes: CheckboxItemType[];
169
190
  separator?: boolean;
@@ -174,6 +195,21 @@ declare interface CheckboxItemType extends BaseMenuItemType {
174
195
  onSelect?: Dispatch<SetStateAction<boolean>>;
175
196
  }
176
197
 
198
+ export declare interface CheckboxProps {
199
+ name?: string;
200
+ disabled?: boolean;
201
+ error?: boolean;
202
+ checked?: boolean;
203
+ onCheckedChange?: (checked: boolean) => void;
204
+ label: string;
205
+ description?: React.ReactNode;
206
+ labelWrapperClassName?: string;
207
+ labelClassName?: string;
208
+ descriptionClassName?: string;
209
+ checkboxClassName?: string;
210
+ wrapperClassName?: string;
211
+ }
212
+
177
213
  /***
178
214
  *
179
215
  * CLASSHELPER
@@ -333,13 +369,13 @@ declare interface FooterItemType extends BaseMenuItemType {
333
369
 
334
370
  export declare const Form: {
335
371
  <T extends FieldValues>(props: FormProps<T>): JSX_2.Element;
336
- Button: ({ type, ...rest }: ButtonProps_2) => JSX_2.Element;
372
+ Button: ({ type, variant, ...rest }: ButtonProps_2) => JSX_2.Element;
337
373
  Input: ForwardRefExoticComponent<Omit<InputProps_2, "ref"> & RefAttributes<HTMLInputElement>>;
338
374
  Select: (props: PropsWithChildren<SelectProps_2>) => JSX_2.Element;
339
375
  Combobox: (props: PropsWithChildren<ComboboxProps_2>) => JSX_2.Element;
340
376
  RadioGroup: (props: PropsWithChildren<RadioGroupProps_2>) => JSX_2.Element;
341
377
  RadioGroupItem: {
342
- ({ value, disabled, error, name, children, className: propsClassName, }: React.PropsWithChildren<RadioGroupItemProps_2>): JSX_2.Element;
378
+ ({ value, disabled, error, name, label, description, wrapperClassName, labelClassName, descriptionClassName, labelWrapperClassName, }: React.PropsWithChildren<RadioGroupItemProps_2>): JSX_2.Element;
343
379
  displayName: string;
344
380
  };
345
381
  Group: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
@@ -351,6 +387,11 @@ export declare const Form: {
351
387
  TagsInput: (props: PropsWithChildren<FieldBaseProps & Omit<TagsInputProps_2, "value" | "onBlur" | "onChange"> & {
352
388
  name: string;
353
389
  }>) => JSX_2.Element;
390
+ CheckboxGroup: (props: PropsWithChildren<CheckboxGroupProps_2>) => JSX_2.Element;
391
+ Checkbox: {
392
+ ({ disabled, error, name, checked, onCheckedChange, label, description, labelWrapperClassName, labelClassName, descriptionClassName, checkboxClassName, wrapperClassName, }: React.PropsWithChildren<CheckboxProps_2>): JSX_2.Element;
393
+ displayName: string;
394
+ };
354
395
  };
355
396
 
356
397
  declare type FormProps<T extends FieldValues> = PropsWithChildren<{
@@ -452,15 +493,8 @@ export declare function Progress({ className, value, ...props }: React_2.Compone
452
493
 
453
494
  export declare const RadioGroup: default_2.ForwardRefExoticComponent<RadioGroupProps & default_2.RefAttributes<HTMLDivElement>>;
454
495
 
455
- export declare interface RadioGroupFormProps extends RadioGroupProps {
456
- name: string;
457
- label?: string;
458
- description?: string;
459
- tooltip?: string;
460
- }
461
-
462
496
  export declare const RadioGroupItem: {
463
- ({ value, disabled, error, name, children, className: propsClassName, }: React.PropsWithChildren<RadioGroupItemProps>): JSX_2.Element;
497
+ ({ value, disabled, error, name, label, description, wrapperClassName, labelClassName, descriptionClassName, labelWrapperClassName, }: React.PropsWithChildren<RadioGroupItemProps>): JSX_2.Element;
464
498
  displayName: string;
465
499
  };
466
500
 
@@ -470,6 +504,12 @@ export declare interface RadioGroupItemProps {
470
504
  disabled?: boolean;
471
505
  error?: boolean;
472
506
  className?: string;
507
+ label: React.ReactNode;
508
+ description?: React.ReactNode;
509
+ labelWrapperClassName?: string;
510
+ labelClassName?: string;
511
+ descriptionClassName?: string;
512
+ wrapperClassName?: string;
473
513
  }
474
514
 
475
515
  export declare interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement> {