@televet/kibble-ui 1.3.2 → 1.4.0-release.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.
@@ -0,0 +1,125 @@
1
+ export declare const formControlArgTypes: {
2
+ onChange: {
3
+ type: {
4
+ required: boolean;
5
+ };
6
+ table: {
7
+ type: {
8
+ summary: string;
9
+ };
10
+ };
11
+ };
12
+ size: {
13
+ control: string;
14
+ description: string;
15
+ options: string[];
16
+ table: {
17
+ type: {
18
+ summary: string;
19
+ };
20
+ defaultValue: {
21
+ summary: string;
22
+ };
23
+ };
24
+ defaultValue: string;
25
+ };
26
+ label: {
27
+ control: string;
28
+ type: {
29
+ name: string;
30
+ };
31
+ table: {
32
+ type: {
33
+ summary: string;
34
+ };
35
+ };
36
+ };
37
+ helperText: {
38
+ control: string;
39
+ type: {
40
+ name: string;
41
+ };
42
+ table: {
43
+ type: {
44
+ summary: string;
45
+ };
46
+ defaultValue: {
47
+ summary: string;
48
+ };
49
+ };
50
+ };
51
+ errorText: {
52
+ control: string;
53
+ type: {
54
+ name: string;
55
+ };
56
+ table: {
57
+ type: {
58
+ summary: string;
59
+ };
60
+ };
61
+ };
62
+ isDisabled: {
63
+ type: string;
64
+ description: string;
65
+ table: {
66
+ type: {
67
+ summary: string;
68
+ };
69
+ defaultValue: {
70
+ summary: string;
71
+ };
72
+ };
73
+ defaultValue: boolean;
74
+ };
75
+ isInvalid: {
76
+ type: string;
77
+ description: string;
78
+ table: {
79
+ type: {
80
+ summary: string;
81
+ };
82
+ defaultValue: {
83
+ summary: string;
84
+ };
85
+ };
86
+ defaultValue: boolean;
87
+ };
88
+ isReadOnly: {
89
+ type: string;
90
+ table: {
91
+ type: {
92
+ summary: string;
93
+ };
94
+ defaultValue: {
95
+ summary: string;
96
+ };
97
+ };
98
+ defaultValue: boolean;
99
+ };
100
+ isRequired: {
101
+ type: string;
102
+ description: string;
103
+ table: {
104
+ type: {
105
+ summary: string;
106
+ };
107
+ defaultValue: {
108
+ summary: string;
109
+ };
110
+ };
111
+ defaultValue: boolean;
112
+ };
113
+ autoFocus: {
114
+ type: string;
115
+ table: {
116
+ type: {
117
+ summary: string;
118
+ };
119
+ defaultValue: {
120
+ summary: string;
121
+ };
122
+ };
123
+ defaultValue: boolean;
124
+ };
125
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface WithFormControlProps {
3
+ errorText?: string;
4
+ helperText?: string;
5
+ isDisabled?: boolean;
6
+ isFieldInline?: boolean;
7
+ isInvalid?: boolean;
8
+ isReadOnly?: boolean;
9
+ isRequired?: boolean;
10
+ label?: string;
11
+ }
12
+ export declare function withFormControl<P extends object>(Component: React.ComponentType<P>): React.FC<P & WithFormControlProps>;
@@ -0,0 +1,2 @@
1
+ import { ComponentStyleConfig } from '@chakra-ui/react';
2
+ export declare const FormControlConfig: ComponentStyleConfig;
@@ -0,0 +1,2 @@
1
+ export * from './ratingDot.component';
2
+ export * from './ratingDots.component';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface IRatingDotProps {
3
+ number: number;
4
+ isInteractive?: boolean;
5
+ isDisabled?: boolean;
6
+ onClick?: (value: number) => void;
7
+ selected: boolean;
8
+ }
9
+ export declare const RatingDot: ({ number, isInteractive, isDisabled, onClick, selected }: IRatingDotProps) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export interface IRatingDotsProps {
3
+ minValue: number;
4
+ maxValue: number;
5
+ minLabel?: string;
6
+ maxLabel?: string;
7
+ centeredLabel?: string;
8
+ isInteractive?: boolean;
9
+ isDisabled?: boolean;
10
+ onClick?: (value: number) => void;
11
+ selected?: number;
12
+ }
13
+ export declare const RatingDots: ({ minValue, maxValue, minLabel, maxLabel, centeredLabel, isDisabled, isInteractive, onClick, selected, }: IRatingDotsProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './select.component';
2
+ export * from './select.config';
3
+ export * from './select.types';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { SelectProps as CSelectProps } from '@chakra-ui/react';
3
+ import { WithFormControlProps } from '../FormControl/formControl.component';
4
+ import { SelectOptionProps } from './select.types';
5
+ export interface SelectProps extends WithFormControlProps, CSelectProps {
6
+ options: SelectOptionProps[];
7
+ }
8
+ declare const WrappedSelect: React.FC<SelectProps & WithFormControlProps>;
9
+ export { WrappedSelect as Select };
@@ -0,0 +1,2 @@
1
+ import { ComponentStyleConfig } from '@chakra-ui/react';
2
+ export declare const SelectConfig: ComponentStyleConfig;
@@ -0,0 +1,4 @@
1
+ export interface SelectOptionProps {
2
+ value: string;
3
+ text: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export * from './switch.component';
2
+ export * from './switch.config';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SwitchProps as CSwitchProps } from '@chakra-ui/react';
3
+ import { WithFormControlProps } from '../FormControl/formControl.component';
4
+ export interface SwitchProps extends WithFormControlProps, CSwitchProps {
5
+ }
6
+ declare const WrappedSwitch: React.FC<SwitchProps & WithFormControlProps>;
7
+ export { WrappedSwitch as Switch };
@@ -0,0 +1,2 @@
1
+ import { ComponentStyleConfig } from '@chakra-ui/react';
2
+ export declare const SwitchConfig: ComponentStyleConfig;
@@ -0,0 +1,2 @@
1
+ export * from './textInput.component';
2
+ export * from './textInput.config';
@@ -0,0 +1,9 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { InputProps as CInputProps } from '@chakra-ui/react';
3
+ import { WithFormControlProps } from 'components/Forms/FormControl/formControl.component';
4
+ export interface TextInputProps extends WithFormControlProps, CInputProps {
5
+ leftElement?: ReactElement;
6
+ rightElement?: ReactElement;
7
+ }
8
+ declare const WrappedTextInput: React.FC<TextInputProps & WithFormControlProps>;
9
+ export { WrappedTextInput as TextInput };
@@ -0,0 +1,2 @@
1
+ import { ComponentStyleConfig } from '@chakra-ui/react';
2
+ export declare const TextInputConfig: ComponentStyleConfig;
@@ -1,3 +1,2 @@
1
1
  export * from './textarea.component';
2
- export * from './textarea.types';
3
2
  export * from './textarea.config';
@@ -1,5 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TextareaProps as CTextareaProps } from '@chakra-ui/react';
3
- export interface TextareaProps extends CTextareaProps {
3
+ import { WithFormControlProps } from '../FormControl/formControl.component';
4
+ export interface TextareaProps extends WithFormControlProps, CTextareaProps {
4
5
  }
5
- export declare const Textarea: (props: TextareaProps) => JSX.Element;
6
+ declare const WrappedTextArea: React.FC<TextareaProps & WithFormControlProps>;
7
+ export { WrappedTextArea as Textarea };
@@ -1,2 +1,6 @@
1
1
  export * from './Button';
2
2
  export * from './Textarea';
3
+ export * from './TextInput';
4
+ export * from './RatingDots';
5
+ export * from './Select';
6
+ export * from './Switch';
@@ -5,3 +5,4 @@ export * from './MediaAndIcons';
5
5
  export * from './Other';
6
6
  export * from './Overlay';
7
7
  export * from './Typography';
8
+ export { Divider, InputGroup, InputLeftElement, InputRightElement, } from '@chakra-ui/react';