@kroo-web/design-system 1.7.0 → 1.9.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.
@@ -9,3 +9,15 @@ export type TCheckboxProps<T extends FieldValues> = {
9
9
  variant?: 'checkbox' | 'radio';
10
10
  };
11
11
  export declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => React.JSX.Element;
12
+ export type TNativeCheckboxProps = {
13
+ disabled?: boolean;
14
+ error?: {
15
+ message: string;
16
+ };
17
+ helper?: {
18
+ message: string;
19
+ };
20
+ id: string;
21
+ label: ReactNode | string;
22
+ } & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
23
+ export declare const NativeCheckbox: React.ForwardRefExoticComponent<Omit<TNativeCheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
+ import { ComboBoxProps } from 'react-aria-components';
2
3
  import { ControllerRenderProps, FieldValues } from 'react-hook-form';
3
4
  export type TComboBoxItem = {
4
5
  img?: string;
@@ -15,3 +16,36 @@ export type TComboBoxProps = {
15
16
  };
16
17
  export declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React.JSX.Element;
17
18
  export declare const Field: ({ alwaysOpen, field: { onBlur, ...restField }, label, onSelect, options }: TComboBoxProps) => React.JSX.Element;
19
+ export type TNativeComboBoxRootProps = {
20
+ children: ReactNode;
21
+ disabled?: boolean;
22
+ error?: {
23
+ message: string;
24
+ };
25
+ helper?: {
26
+ message: string;
27
+ };
28
+ hideLabel?: boolean;
29
+ id: string;
30
+ label: string;
31
+ missing?: boolean;
32
+ placeholder?: string;
33
+ } & Omit<ComboBoxProps<TComboBoxItem>, 'children' | 'isDisabled' | 'label' | 'onOpenChange' | 'placeholder'>;
34
+ export declare const Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
35
+ export declare const Options: ({ children }: {
36
+ children: ReactNode;
37
+ }) => React.JSX.Element;
38
+ export declare const Item: ({ children, img }: {
39
+ children: ReactNode;
40
+ img?: string;
41
+ }) => React.JSX.Element;
42
+ export declare const NativeComboBox: {
43
+ Item: ({ children, img }: {
44
+ children: ReactNode;
45
+ img?: string;
46
+ }) => React.JSX.Element;
47
+ Options: ({ children }: {
48
+ children: ReactNode;
49
+ }) => React.JSX.Element;
50
+ Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
51
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export type TFieldErrorProps = {
3
+ error: {
4
+ message: string;
5
+ };
6
+ };
7
+ export declare const FieldError: ({ error }: TFieldErrorProps) => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export type TFieldHelperProps = {
3
+ helper: {
4
+ message: string;
5
+ };
6
+ /**
7
+ * The id of the field helper this is required and expected to be used in conjunction with describeBy on the input field
8
+ * so they are associated..
9
+ */
10
+ id: string;
11
+ };
12
+ export declare const FieldHelper: ({ helper, id }: TFieldHelperProps) => React.JSX.Element;