@6thbridge/hexa 0.0.1 → 0.0.2

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.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as React$1 from 'react';
2
2
  import React__default, { DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
3
3
  import * as LabelPrimitive from '@radix-ui/react-label';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -24,8 +24,8 @@ declare const buttonVariants: (props?: ({
24
24
  interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, VariantProps<typeof buttonVariants> {
25
25
  asChild?: boolean;
26
26
  isLoading?: boolean;
27
- leftNode?: React.ReactNode;
28
- rightNode?: React.ReactNode;
27
+ leftNode?: React$1.ReactNode;
28
+ rightNode?: React$1.ReactNode;
29
29
  LoaderSize?: number;
30
30
  }
31
31
  declare const Button: {
@@ -36,7 +36,7 @@ declare const Button: {
36
36
  declare const inputVariants: (props?: ({
37
37
  status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
38
38
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
39
- interface BaseInnerInputProps extends DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
39
+ interface BaseInnerInputProps extends DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
40
40
  }
41
41
  declare const inputContainerVariants: (props?: ({
42
42
  status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
@@ -44,12 +44,12 @@ declare const inputContainerVariants: (props?: ({
44
44
  interface InputProps extends BaseInnerInputProps, VariantProps<typeof inputContainerVariants> {
45
45
  isLoading?: boolean;
46
46
  error?: string;
47
- leftNode?: React.ReactNode;
48
- rightNode?: React.ReactNode;
47
+ leftNode?: React$1.ReactNode;
48
+ rightNode?: React$1.ReactNode;
49
49
  sideNodeClassName?: string;
50
50
  label?: string;
51
51
  showAsterisk?: boolean;
52
- description?: React.ReactNode;
52
+ description?: React$1.ReactNode;
53
53
  }
54
54
  declare const Input: {
55
55
  ({ className, status, disabled, error, isLoading, sideNodeClassName, showAsterisk, label, description, ref, ...props }: InputProps): react_jsx_runtime.JSX.Element;
@@ -61,12 +61,12 @@ declare const PasswordInput: {
61
61
  displayName: string;
62
62
  };
63
63
 
64
- interface TextareaProps extends DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, VariantProps<typeof inputContainerVariants> {
64
+ interface TextareaProps extends DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, VariantProps<typeof inputContainerVariants> {
65
65
  isLoading?: boolean;
66
66
  error?: string;
67
67
  label?: string;
68
68
  showAsterisk?: boolean;
69
- description?: React.ReactNode;
69
+ description?: React$1.ReactNode;
70
70
  }
71
71
  declare const Textarea: {
72
72
  ({ className, status, disabled, error, isLoading, showAsterisk, label, description, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
@@ -79,10 +79,14 @@ type SearchableDataType = {
79
79
  } & {
80
80
  [key: string]: any;
81
81
  };
82
- interface SearchableProps {
82
+
83
+ type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
84
+ interface SelectProps {
83
85
  modal?: boolean;
84
86
  hideSearch?: boolean;
85
87
  loading?: boolean;
88
+ inputValue?: string;
89
+ onInputValueChange?: (arg: string) => void;
86
90
  disabled?: boolean;
87
91
  placeholder?: string;
88
92
  value?: SearchableDataType;
@@ -91,15 +95,8 @@ interface SearchableProps {
91
95
  className?: string;
92
96
  containerClassName?: string;
93
97
  onChange: (value: SearchableDataType) => void;
94
- children?: React.ReactNode;
95
- }
96
- interface SearchableTriggerProps extends VariantProps<typeof inputContainerVariants> {
97
- disabled?: boolean;
98
- placeholder?: string;
99
- value?: string;
100
- className?: string;
98
+ status?: SelectPropsStatus;
101
99
  }
102
- declare const SearchableTrigger: ({ className, value, placeholder, status, disabled, }: SearchableTriggerProps) => react_jsx_runtime.JSX.Element;
103
- declare const Searchable: ({ options, value, onChange, containerClassName, placeholder, disabled, loading, optionComponent, children, modal, hideSearch, className, }: SearchableProps) => react_jsx_runtime.JSX.Element;
100
+ declare const Select: ({ hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
104
101
 
105
- export { Button, FormLabel, Input, Loader, PasswordInput, Searchable, SearchableTrigger, Textarea };
102
+ export { Button, FormLabel, Input, Loader, PasswordInput, Select, Textarea };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import * as React$1 from 'react';
2
2
  import React__default, { DetailedHTMLProps, ButtonHTMLAttributes } from 'react';
3
3
  import * as LabelPrimitive from '@radix-ui/react-label';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -24,8 +24,8 @@ declare const buttonVariants: (props?: ({
24
24
  interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, VariantProps<typeof buttonVariants> {
25
25
  asChild?: boolean;
26
26
  isLoading?: boolean;
27
- leftNode?: React.ReactNode;
28
- rightNode?: React.ReactNode;
27
+ leftNode?: React$1.ReactNode;
28
+ rightNode?: React$1.ReactNode;
29
29
  LoaderSize?: number;
30
30
  }
31
31
  declare const Button: {
@@ -36,7 +36,7 @@ declare const Button: {
36
36
  declare const inputVariants: (props?: ({
37
37
  status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
38
38
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
39
- interface BaseInnerInputProps extends DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
39
+ interface BaseInnerInputProps extends DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, VariantProps<typeof inputVariants> {
40
40
  }
41
41
  declare const inputContainerVariants: (props?: ({
42
42
  status?: "loading" | "default" | "error" | "prefilled" | null | undefined;
@@ -44,12 +44,12 @@ declare const inputContainerVariants: (props?: ({
44
44
  interface InputProps extends BaseInnerInputProps, VariantProps<typeof inputContainerVariants> {
45
45
  isLoading?: boolean;
46
46
  error?: string;
47
- leftNode?: React.ReactNode;
48
- rightNode?: React.ReactNode;
47
+ leftNode?: React$1.ReactNode;
48
+ rightNode?: React$1.ReactNode;
49
49
  sideNodeClassName?: string;
50
50
  label?: string;
51
51
  showAsterisk?: boolean;
52
- description?: React.ReactNode;
52
+ description?: React$1.ReactNode;
53
53
  }
54
54
  declare const Input: {
55
55
  ({ className, status, disabled, error, isLoading, sideNodeClassName, showAsterisk, label, description, ref, ...props }: InputProps): react_jsx_runtime.JSX.Element;
@@ -61,12 +61,12 @@ declare const PasswordInput: {
61
61
  displayName: string;
62
62
  };
63
63
 
64
- interface TextareaProps extends DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, VariantProps<typeof inputContainerVariants> {
64
+ interface TextareaProps extends DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, VariantProps<typeof inputContainerVariants> {
65
65
  isLoading?: boolean;
66
66
  error?: string;
67
67
  label?: string;
68
68
  showAsterisk?: boolean;
69
- description?: React.ReactNode;
69
+ description?: React$1.ReactNode;
70
70
  }
71
71
  declare const Textarea: {
72
72
  ({ className, status, disabled, error, isLoading, showAsterisk, label, description, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
@@ -79,10 +79,14 @@ type SearchableDataType = {
79
79
  } & {
80
80
  [key: string]: any;
81
81
  };
82
- interface SearchableProps {
82
+
83
+ type SelectPropsStatus = VariantProps<typeof inputContainerVariants>["status"];
84
+ interface SelectProps {
83
85
  modal?: boolean;
84
86
  hideSearch?: boolean;
85
87
  loading?: boolean;
88
+ inputValue?: string;
89
+ onInputValueChange?: (arg: string) => void;
86
90
  disabled?: boolean;
87
91
  placeholder?: string;
88
92
  value?: SearchableDataType;
@@ -91,15 +95,8 @@ interface SearchableProps {
91
95
  className?: string;
92
96
  containerClassName?: string;
93
97
  onChange: (value: SearchableDataType) => void;
94
- children?: React.ReactNode;
95
- }
96
- interface SearchableTriggerProps extends VariantProps<typeof inputContainerVariants> {
97
- disabled?: boolean;
98
- placeholder?: string;
99
- value?: string;
100
- className?: string;
98
+ status?: SelectPropsStatus;
101
99
  }
102
- declare const SearchableTrigger: ({ className, value, placeholder, status, disabled, }: SearchableTriggerProps) => react_jsx_runtime.JSX.Element;
103
- declare const Searchable: ({ options, value, onChange, containerClassName, placeholder, disabled, loading, optionComponent, children, modal, hideSearch, className, }: SearchableProps) => react_jsx_runtime.JSX.Element;
100
+ declare const Select: ({ hideSearch, status, ...props }: SelectProps) => react_jsx_runtime.JSX.Element;
104
101
 
105
- export { Button, FormLabel, Input, Loader, PasswordInput, Searchable, SearchableTrigger, Textarea };
102
+ export { Button, FormLabel, Input, Loader, PasswordInput, Select, Textarea };