eglador-ui-react 0.1.0-alpha.3 → 0.1.0-alpha.4

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/README.md CHANGED
@@ -24,7 +24,7 @@ Add the following to your global stylesheet (e.g. `app/globals.css`) so Tailwind
24
24
  ## Usage
25
25
 
26
26
  ```tsx
27
- import { Button, ButtonGroup, Checkbox, CheckboxGroup } from "eglador-ui-react";
27
+ import { Button, ButtonGroup, Checkbox, CheckboxGroup, Input, InputGroup, Dropdown } from "eglador-ui-react";
28
28
  ```
29
29
 
30
30
  ## Components
@@ -35,6 +35,11 @@ import { Button, ButtonGroup, Checkbox, CheckboxGroup } from "eglador-ui-react";
35
35
  | **ButtonGroup** | `variant`, `className`, `children` |
36
36
  | **Checkbox** | `variant`, `color`, `size`, `checked`, `onChange`, `indeterminate`, `label`, `description`, `disabled`, `name`, `value`, `className` |
37
37
  | **CheckboxGroup** | `variant`, `className`, `children` |
38
+ | **Input** | `variant`, `color`, `size`, `shape`, `state`, `icon`, `iconRight`, `loading`, `label`, `errorMessage`, `successMessage`, `disabled`, `wrapperClassName`, `className` |
39
+ | **InputGroup** | `variant`, `className`, `children` |
40
+ | **Dropdown** | `side`, `align`, `width`, `maxHeight`, `scroll`, `autoFlip`, `open`, `onOpenChange`, `className` |
41
+ | **Dropdown.Trigger** | `asChild`, `className`, `children` |
42
+ | **Dropdown.Content** | `className`, `children` |
38
43
 
39
44
  ## Development
40
45
 
package/dist/index.d.mts CHANGED
@@ -56,6 +56,73 @@ interface CheckboxGroupProps {
56
56
  }
57
57
  declare function CheckboxGroup({ variant, className, children, }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
58
58
 
59
+ type DropdownSide = "bottom" | "top" | "right" | "left";
60
+ type DropdownAlign = "left" | "right" | "top" | "bottom" | "start" | "center" | "end";
61
+ type DropdownWidth = number | "trigger" | "auto";
62
+ interface DropdownProps {
63
+ side?: DropdownSide;
64
+ align?: DropdownAlign;
65
+ width?: DropdownWidth;
66
+ maxHeight?: number;
67
+ scroll?: boolean;
68
+ autoFlip?: boolean;
69
+ open?: boolean;
70
+ onOpenChange?: (open: boolean) => void;
71
+ className?: string;
72
+ children: React.ReactNode;
73
+ }
74
+ interface DropdownTriggerProps {
75
+ className?: string;
76
+ children?: React.ReactNode;
77
+ asChild?: boolean;
78
+ }
79
+ interface DropdownContentProps {
80
+ className?: string;
81
+ children: React.ReactNode;
82
+ }
83
+ declare function DropdownTrigger({ className, children, asChild }: DropdownTriggerProps): react_jsx_runtime.JSX.Element;
84
+ declare namespace DropdownTrigger {
85
+ var displayName: string;
86
+ }
87
+ declare function DropdownContent({ className, children }: DropdownContentProps): react_jsx_runtime.JSX.Element | null;
88
+ declare namespace DropdownContent {
89
+ var displayName: string;
90
+ }
91
+ declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>> & {
92
+ Trigger: typeof DropdownTrigger;
93
+ Content: typeof DropdownContent;
94
+ };
95
+
96
+ type InputSize = "xs" | "sm" | "md";
97
+ type InputShape = "square" | "rounded";
98
+ type InputVariant = "default" | "outline" | "ghost";
99
+ type InputColor = "default" | "black" | "primary" | "danger" | "success" | "warning" | "info";
100
+ type InputState = "idle" | "error" | "success";
101
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
102
+ variant?: InputVariant;
103
+ size?: InputSize;
104
+ shape?: InputShape;
105
+ color?: InputColor;
106
+ state?: InputState;
107
+ icon?: React.ReactNode;
108
+ iconRight?: React.ReactNode;
109
+ loading?: boolean;
110
+ label?: string;
111
+ errorMessage?: string;
112
+ successMessage?: string;
113
+ wrapperClassName?: string;
114
+ className?: string;
115
+ }
116
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
117
+
118
+ type InputGroupVariant = "bordered" | "stacked";
119
+ interface InputGroupProps {
120
+ variant?: InputGroupVariant;
121
+ className?: string;
122
+ children: React.ReactNode;
123
+ }
124
+ declare function InputGroup({ variant, className, children, }: InputGroupProps): react_jsx_runtime.JSX.Element;
125
+
59
126
  declare function cn(...inputs: ClassValue[]): string;
60
127
 
61
- export { Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupProps, type CheckboxGroupVariant, type CheckboxProps, type CheckboxSize, type CheckboxVariant, cn };
128
+ export { Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupProps, type CheckboxGroupVariant, type CheckboxProps, type CheckboxSize, type CheckboxVariant, Dropdown, type DropdownAlign, type DropdownContentProps, type DropdownProps, type DropdownSide, type DropdownTriggerProps, type DropdownWidth, Input, type InputColor, InputGroup, type InputGroupProps, type InputGroupVariant, type InputProps, type InputShape, type InputSize, type InputState, type InputVariant, cn };
package/dist/index.d.ts CHANGED
@@ -56,6 +56,73 @@ interface CheckboxGroupProps {
56
56
  }
57
57
  declare function CheckboxGroup({ variant, className, children, }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
58
58
 
59
+ type DropdownSide = "bottom" | "top" | "right" | "left";
60
+ type DropdownAlign = "left" | "right" | "top" | "bottom" | "start" | "center" | "end";
61
+ type DropdownWidth = number | "trigger" | "auto";
62
+ interface DropdownProps {
63
+ side?: DropdownSide;
64
+ align?: DropdownAlign;
65
+ width?: DropdownWidth;
66
+ maxHeight?: number;
67
+ scroll?: boolean;
68
+ autoFlip?: boolean;
69
+ open?: boolean;
70
+ onOpenChange?: (open: boolean) => void;
71
+ className?: string;
72
+ children: React.ReactNode;
73
+ }
74
+ interface DropdownTriggerProps {
75
+ className?: string;
76
+ children?: React.ReactNode;
77
+ asChild?: boolean;
78
+ }
79
+ interface DropdownContentProps {
80
+ className?: string;
81
+ children: React.ReactNode;
82
+ }
83
+ declare function DropdownTrigger({ className, children, asChild }: DropdownTriggerProps): react_jsx_runtime.JSX.Element;
84
+ declare namespace DropdownTrigger {
85
+ var displayName: string;
86
+ }
87
+ declare function DropdownContent({ className, children }: DropdownContentProps): react_jsx_runtime.JSX.Element | null;
88
+ declare namespace DropdownContent {
89
+ var displayName: string;
90
+ }
91
+ declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>> & {
92
+ Trigger: typeof DropdownTrigger;
93
+ Content: typeof DropdownContent;
94
+ };
95
+
96
+ type InputSize = "xs" | "sm" | "md";
97
+ type InputShape = "square" | "rounded";
98
+ type InputVariant = "default" | "outline" | "ghost";
99
+ type InputColor = "default" | "black" | "primary" | "danger" | "success" | "warning" | "info";
100
+ type InputState = "idle" | "error" | "success";
101
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
102
+ variant?: InputVariant;
103
+ size?: InputSize;
104
+ shape?: InputShape;
105
+ color?: InputColor;
106
+ state?: InputState;
107
+ icon?: React.ReactNode;
108
+ iconRight?: React.ReactNode;
109
+ loading?: boolean;
110
+ label?: string;
111
+ errorMessage?: string;
112
+ successMessage?: string;
113
+ wrapperClassName?: string;
114
+ className?: string;
115
+ }
116
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
117
+
118
+ type InputGroupVariant = "bordered" | "stacked";
119
+ interface InputGroupProps {
120
+ variant?: InputGroupVariant;
121
+ className?: string;
122
+ children: React.ReactNode;
123
+ }
124
+ declare function InputGroup({ variant, className, children, }: InputGroupProps): react_jsx_runtime.JSX.Element;
125
+
59
126
  declare function cn(...inputs: ClassValue[]): string;
60
127
 
61
- export { Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupProps, type CheckboxGroupVariant, type CheckboxProps, type CheckboxSize, type CheckboxVariant, cn };
128
+ export { Button, type ButtonColor, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupProps, type CheckboxGroupVariant, type CheckboxProps, type CheckboxSize, type CheckboxVariant, Dropdown, type DropdownAlign, type DropdownContentProps, type DropdownProps, type DropdownSide, type DropdownTriggerProps, type DropdownWidth, Input, type InputColor, InputGroup, type InputGroupProps, type InputGroupVariant, type InputProps, type InputShape, type InputSize, type InputState, type InputVariant, cn };