@walidsj/react-ui 0.1.1 → 0.1.3
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 +1 -0
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/input.d.ts +9 -1
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/textarea.d.ts +13 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1216 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/cn.d.ts +1 -2
- package/dist/style.css +34 -14
- package/package.json +40 -41
package/README.md
CHANGED
|
@@ -69,6 +69,7 @@ Renders a native `<input>` and forwards native input props and refs.
|
|
|
69
69
|
| Prop | Type | Default |
|
|
70
70
|
| ----------- | --------- | ------- |
|
|
71
71
|
| `invalid` | `boolean` | `false` |
|
|
72
|
+
| `size` | `sm \| md \| lg` | `md` |
|
|
72
73
|
| `className` | `string` | — |
|
|
73
74
|
|
|
74
75
|
`invalid` sets `aria-invalid="true"` and applies error styling. A
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { InputProps } from './input';
|
|
1
|
+
export type { InputProps, InputSize } from './input';
|
|
2
2
|
export { Input } from './input';
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
invalid?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type InputSize = NonNullable<VariantProps<typeof inputVariants>["size"]>;
|
|
8
|
+
export interface InputProps extends Omit<ComponentPropsWithoutRef<"input">, "size"> {
|
|
3
9
|
invalid?: boolean;
|
|
10
|
+
size?: InputSize;
|
|
4
11
|
}
|
|
5
12
|
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea, type TextareaProps, type TextareaSize } from './textarea';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
invalid?: boolean | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type TextareaSize = NonNullable<VariantProps<typeof textareaVariants>["size"]>;
|
|
8
|
+
export interface TextareaProps extends ComponentPropsWithoutRef<"textarea"> {
|
|
9
|
+
invalid?: boolean;
|
|
10
|
+
size?: TextareaSize;
|
|
11
|
+
}
|
|
12
|
+
export declare const Textarea: import('react').ForwardRefExoticComponent<TextareaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
13
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { ButtonProps, ButtonSize, ButtonVariant, } from './components/button';
|
|
2
2
|
export { Button } from './components/button';
|
|
3
|
-
export type { InputProps } from './components/input';
|
|
3
|
+
export type { InputProps, InputSize } from './components/input';
|
|
4
4
|
export { Input } from './components/input';
|
|
5
|
+
export type { TextareaProps, TextareaSize } from './components/textarea';
|
|
6
|
+
export { Textarea } from './components/textarea';
|