oziko-ui-kit 0.0.44 → 0.0.45

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.
@@ -1,6 +1,6 @@
1
1
  import { TypeText } from "../../../text/Text";
2
2
  import { TypeFlexElement } from "../../../flex-element/FlexElement";
3
- import { TypeArrayItems, TypeValueType } from "../../../../../custom-hooks/useInputRepresenter";
3
+ import { TypeArrayItems, TypeInputRepresenterError, TypeValueType } from "../../../../../custom-hooks/useInputRepresenter";
4
4
  export type TypeArrayInput = {
5
5
  value?: TypeValueType[];
6
6
  title?: string;
@@ -13,6 +13,7 @@ export type TypeArrayInput = {
13
13
  propertyKey: string;
14
14
  items?: TypeArrayItems;
15
15
  onChange?: (value: any) => void;
16
+ errors?: TypeInputRepresenterError | string;
16
17
  } & TypeFlexElement;
17
18
  declare const _default: import("react").NamedExoticComponent<TypeArrayInput>;
18
19
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { TypeText } from "../../../text/Text";
2
2
  import { TypeFlexElement } from "../../../flex-element/FlexElement";
3
- import { TypeProperties, TypeRepresenterValue } from "../../../../../custom-hooks/useInputRepresenter";
3
+ import { TypeInputRepresenterError, TypeProperties, TypeRepresenterValue } from "../../../../../custom-hooks/useInputRepresenter";
4
4
  export type TypeObjectInput = {
5
5
  value?: TypeRepresenterValue;
6
6
  properties: TypeProperties;
@@ -10,6 +10,7 @@ export type TypeObjectInput = {
10
10
  helperTextContainerProps?: TypeFlexElement;
11
11
  helperTextProps?: TypeText;
12
12
  onChange?: (value: any) => void;
13
+ errors?: TypeInputRepresenterError;
13
14
  } & TypeFlexElement;
14
15
  declare const _default: import("react").NamedExoticComponent<TypeObjectInput>;
15
16
  export default _default;
@@ -30,6 +30,7 @@ export type TypeProperties = {
30
30
  totalOptionsLength?: number;
31
31
  size?: TypeSwitch["size"];
32
32
  valueType?: TypeChipInput["valueType"];
33
+ error?: TypeInputRepresenterError | string;
33
34
  };
34
35
  };
35
36
  export type TypeValueType = string | number | boolean | string[] | number[] | boolean[] | TypeRepresenterValue | TypeRepresenterValue[];
@@ -61,11 +62,12 @@ export type TypeInputProps<T> = {
61
62
  size?: TypeSwitch["size"];
62
63
  };
63
64
  export type TypeInputRepresenterError = {
64
- [key: string]: string | null;
65
+ [key: string]: string | TypeInputRepresenterError;
65
66
  };
66
67
  type TypeObjectInputProps<T> = {
67
68
  key?: string;
68
69
  properties?: TypeProperties;
70
+ errors?: TypeInputRepresenterError | string | null;
69
71
  } & TypeInputProps<T>;
70
72
  type TypeSelectInputProps<T extends string | number> = {
71
73
  enum?: T[];
@@ -77,6 +79,7 @@ type TypeArrayInputProps<T> = {
77
79
  minItems?: number;
78
80
  maxItems?: number;
79
81
  items?: TypeArrayItems;
82
+ errors?: TypeInputRepresenterError | string | null;
80
83
  } & TypeInputProps<T[]>;
81
84
  type TypeRelationInputProps<T> = {
82
85
  getOptions: () => Promise<TypeLabeledValue[]>;
package/dist/index.css CHANGED
@@ -2991,6 +2991,14 @@ button.font-increment {
2991
2991
  .ObjectInput-module_container__JtW64 input {
2992
2992
  padding: 0;
2993
2993
  }
2994
+
2995
+ .ObjectInput-module_error__z1cTE {
2996
+ position: unset;
2997
+ }
2998
+
2999
+ .ObjectInput-module_inputContainer__Kjm9k {
3000
+ width: 100%;
3001
+ }
2994
3002
  .ChipInput-module_chipInputContainer__wRY2y {
2995
3003
  background-color: var(--oziko-color-input-background);
2996
3004
  border-radius: var(--oziko-border-radius-md);