lawgic-dev-kit 0.23.8 → 0.25.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.
Files changed (27) hide show
  1. package/dist/components/atoms/TextArea/TextArea.d.ts +5 -0
  2. package/dist/components/atoms/TextArea/TextArea.js +92 -0
  3. package/dist/components/atoms/TextArea/TextArea.types.d.ts +12 -0
  4. package/dist/components/atoms/TextArea/index.d.ts +1 -0
  5. package/dist/components/atoms/TextInput/TextInput.d.ts +1 -1
  6. package/dist/components/atoms/TextInput/TextInput.js +26 -21
  7. package/dist/components/atoms/TextInput/TextInput.types.d.ts +1 -0
  8. package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.js +43 -38
  9. package/dist/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -0
  10. package/dist/components/atoms/UploadContainer/UploadContainer.js +104 -92
  11. package/dist/components/atoms/UploadContainer/UploadContainer.types.d.ts +5 -0
  12. package/dist/components/atoms/index.d.ts +1 -0
  13. package/dist/components/molecules/DateInput/DateInput.d.ts +2 -1
  14. package/dist/components/molecules/DateInput/DateInput.js +32 -30
  15. package/dist/index.js +109 -107
  16. package/dist/lawgic-dev-kit.css +1 -1
  17. package/dist/lawgic-dev-kit.umd.js +61 -47
  18. package/dist/src/components/atoms/TextArea/TextArea.d.ts +5 -0
  19. package/dist/src/components/atoms/TextArea/TextArea.types.d.ts +12 -0
  20. package/dist/src/components/atoms/TextArea/index.d.ts +1 -0
  21. package/dist/src/components/atoms/TextInput/TextInput.d.ts +1 -1
  22. package/dist/src/components/atoms/TextInput/TextInput.types.d.ts +1 -0
  23. package/dist/src/components/atoms/UncontrolledTextInput/UncontrolledTextInput.types.d.ts +1 -0
  24. package/dist/src/components/atoms/UploadContainer/UploadContainer.types.d.ts +5 -0
  25. package/dist/src/components/atoms/index.d.ts +1 -0
  26. package/dist/src/components/molecules/DateInput/DateInput.d.ts +2 -1
  27. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { TextAreaProps } from "./TextArea.types";
3
+ import { FieldValues } from "react-hook-form";
4
+ declare const TextArea: <T extends FieldValues = FieldValues>({ label, control, name, placeholder, className, disabled, translateKey, size, rows, ...props }: TextAreaProps<T>) => React.ReactElement;
5
+ export default TextArea;
@@ -0,0 +1,12 @@
1
+ import { Control, FieldValues, Path } from "react-hook-form";
2
+ export type TextAreaProps<T extends FieldValues = FieldValues> = {
3
+ label?: string;
4
+ placeholder?: string;
5
+ className?: string;
6
+ disabled?: boolean;
7
+ translateKey?: string;
8
+ size?: 'sm' | 'md';
9
+ rows?: number;
10
+ control: Control<T>;
11
+ name: Path<T>;
12
+ } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>;
@@ -0,0 +1 @@
1
+ export { default as TextArea } from './TextArea';
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import { TextInputProps } from "./TextInput.types";
3
3
  import { FieldValues } from "react-hook-form";
4
- declare const TextInput: <T extends FieldValues = FieldValues>({ label, control, name, placeholder, className, disabled, leftSide, rightSide, translateKey, size, ...props }: TextInputProps<T>) => React.ReactElement;
4
+ declare const TextInput: <T extends FieldValues = FieldValues>({ label, control, name, placeholder, className, disabled, leftSide, rightSide, translateKey, size, required, ...props }: TextInputProps<T>) => React.ReactElement;
5
5
  export default TextInput;
@@ -4,6 +4,7 @@ export type TextInputProps<T extends FieldValues = FieldValues> = {
4
4
  placeholder?: string;
5
5
  className?: string;
6
6
  disabled?: boolean;
7
+ required?: boolean;
7
8
  translateKey?: string;
8
9
  size?: 'sm' | 'md';
9
10
  control: Control<T>;
@@ -8,6 +8,7 @@ export type UncontrolledTextInputProps = {
8
8
  error?: string | undefined;
9
9
  disabled?: boolean;
10
10
  disabledInput?: boolean;
11
+ required?: boolean;
11
12
  size?: 'sm' | 'md';
12
13
  leftSide?: React.ReactNode;
13
14
  rightSide?: React.ReactNode;
@@ -30,6 +30,11 @@ export interface UploadContainerProps {
30
30
  */
31
31
  maxSize?: number;
32
32
  direction?: 'row' | 'column';
33
+ /**
34
+ * Tamaño del título y la descripción
35
+ * @default 'md' en direction='row', 'lg' en direction='column'
36
+ */
37
+ size?: 'sm' | 'md' | 'lg';
33
38
  disabled?: boolean;
34
39
  loading?: boolean;
35
40
  loadingDuration?: number;
@@ -26,6 +26,7 @@ export * from "./SelectInput/index";
26
26
  export * from "./SidebarButton/index";
27
27
  export * from "./Tab/index";
28
28
  export * from "./TextButton/index";
29
+ export * from "./TextArea/index";
29
30
  export * from "./TextInput/index";
30
31
  export * from "./TextStaticInput/index";
31
32
  export * from "./Toast/index";
@@ -9,6 +9,7 @@ export type DateInputProps<T extends FieldValues = FieldValues> = {
9
9
  futureDates?: boolean;
10
10
  pastDates?: boolean;
11
11
  size?: "sm" | "md";
12
+ required?: boolean;
12
13
  };
13
- declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates, size, }: DateInputProps<T>) => React.ReactElement;
14
+ declare const DateInput: <T extends FieldValues = FieldValues>({ control, name, showTimeSelector, label, translateKey, placeholder, futureDates, pastDates, size, required, }: DateInputProps<T>) => React.ReactElement;
14
15
  export default DateInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.23.8",
3
+ "version": "0.25.0",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,