oziko-ui-kit 0.0.104 → 0.0.105
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,12 +1,15 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
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 TypeMinimizedArrayInput = {
|
|
5
5
|
propertyKey: string;
|
|
6
6
|
value?: TypeValueType[];
|
|
7
7
|
items?: TypeArrayItems;
|
|
8
8
|
popoverProps?: TypeFlexElement;
|
|
9
9
|
contentProps?: TypeFlexElement;
|
|
10
|
+
containerProps?: TypeFlexElement;
|
|
11
|
+
errors?: TypeInputRepresenterError | string;
|
|
12
|
+
onChange?: (value: any) => void;
|
|
10
13
|
} & TypeFlexElement;
|
|
11
14
|
declare const MinimizedArrayInput: FC<TypeMinimizedArrayInput>;
|
|
12
15
|
export default MinimizedArrayInput;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TypeArrayItems, TypeInputRepresenterError, TypeInputType, TypeProperties, TypeValueType } from "./useInputRepresenter";
|
|
2
|
+
export declare const generateDefaultValueForType: (type: TypeInputType, properties?: TypeProperties) => TypeValueType;
|
|
3
|
+
export declare const getDefaultValue: (items?: TypeArrayItems) => TypeValueType;
|
|
4
|
+
type TypeUseArrayItemInput = {
|
|
5
|
+
propertyKey: string;
|
|
6
|
+
items?: TypeArrayItems;
|
|
7
|
+
value?: TypeValueType[];
|
|
8
|
+
activeIndex: number | null;
|
|
9
|
+
onChange?: (value: TypeValueType[]) => void;
|
|
10
|
+
errors?: TypeInputRepresenterError | string;
|
|
11
|
+
};
|
|
12
|
+
export declare const useArrayItemInput: ({ propertyKey, items, value, activeIndex, onChange, errors, }: TypeUseArrayItemInput) => {
|
|
13
|
+
inputFields: (import("react/jsx-runtime").JSX.Element | null)[];
|
|
14
|
+
getDefaultValue: () => TypeValueType;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
package/dist/index.css
CHANGED
|
@@ -3054,28 +3054,47 @@ input:checked + .Switch-module_slider__sHGGR::before {
|
|
|
3054
3054
|
-webkit-line-clamp: 1;
|
|
3055
3055
|
display: block;
|
|
3056
3056
|
}
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
border: var(--oziko-border-default);
|
|
3063
|
-
border-radius: var(--oziko-border-radius-md);
|
|
3057
|
+
|
|
3058
|
+
.Array-module_buttonsContainer__mOaLI {
|
|
3059
|
+
display: flex;
|
|
3060
|
+
gap: 8px;
|
|
3061
|
+
align-items: center;
|
|
3064
3062
|
}
|
|
3065
|
-
|
|
3066
|
-
|
|
3063
|
+
|
|
3064
|
+
.Array-module_itemButtonWrapper__zYbaj {
|
|
3065
|
+
position: relative;
|
|
3066
|
+
display: inline-block;
|
|
3067
3067
|
}
|
|
3068
3068
|
|
|
3069
|
-
.
|
|
3070
|
-
|
|
3069
|
+
.Array-module_itemButton__IvXJ4 {
|
|
3070
|
+
background: var(--oziko-color-border) !important;
|
|
3071
|
+
color: var(--oziko-color-font-primary) !important;
|
|
3072
|
+
border-radius: var(--oziko-border-radius-md) !important;
|
|
3071
3073
|
}
|
|
3072
3074
|
|
|
3073
|
-
.
|
|
3074
|
-
|
|
3075
|
+
.Array-module_removeButton__nj38e {
|
|
3076
|
+
position: absolute;
|
|
3077
|
+
top: -10px;
|
|
3078
|
+
left: 90%;
|
|
3079
|
+
transform: translateX(-50%);
|
|
3080
|
+
opacity: 0;
|
|
3081
|
+
visibility: hidden;
|
|
3082
|
+
transition: opacity 0.2s, visibility 0.2s;
|
|
3083
|
+
background: var(--oziko-color-background-secondary) !important;
|
|
3084
|
+
color: var(--oziko-color-font-primary) !important;
|
|
3085
|
+
z-index: 1;
|
|
3086
|
+
cursor: pointer;
|
|
3087
|
+
width: 20px !important;
|
|
3088
|
+
height: 20px !important;
|
|
3089
|
+
min-width: 20px !important;
|
|
3090
|
+
display: flex;
|
|
3091
|
+
align-items: center;
|
|
3092
|
+
justify-content: center;
|
|
3075
3093
|
}
|
|
3076
3094
|
|
|
3077
|
-
.
|
|
3078
|
-
|
|
3095
|
+
.Array-module_itemButtonWrapper__zYbaj:hover .Array-module_removeButton__nj38e {
|
|
3096
|
+
opacity: 1;
|
|
3097
|
+
visibility: visible;
|
|
3079
3098
|
}
|
|
3080
3099
|
.String-module_icon__pKB1k {
|
|
3081
3100
|
color: var(--oziko-color-font-primary) !important;
|
|
@@ -3656,6 +3675,29 @@ button.font-increment {
|
|
|
3656
3675
|
.ObjectInput-module_inputContainer__Kjm9k {
|
|
3657
3676
|
width: 100%;
|
|
3658
3677
|
}
|
|
3678
|
+
.ArrayInput-module_container__pCN6T {
|
|
3679
|
+
background-color: var(--oziko-color-input-background);
|
|
3680
|
+
border-radius: var(--oziko-border-radius-md);
|
|
3681
|
+
color: var(--oziko-color-input-placeholder);
|
|
3682
|
+
padding: var(--oziko-padding-md) var(--oziko-padding-lg);
|
|
3683
|
+
border: var(--oziko-border-default);
|
|
3684
|
+
border-radius: var(--oziko-border-radius-md);
|
|
3685
|
+
}
|
|
3686
|
+
.ArrayInput-module_container__pCN6T input {
|
|
3687
|
+
padding: 0;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
.ArrayInput-module_header__v88Lg {
|
|
3691
|
+
width: 100%;
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
.ArrayInput-module_inputHeader__YhlBU {
|
|
3695
|
+
padding-left: 0;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
.ArrayInput-module_emptyStateText__ZHJbR {
|
|
3699
|
+
font-size: var(--oziko-icon-size-sm);
|
|
3700
|
+
}
|
|
3659
3701
|
.ChipInput-module_chipInputContainer__wRY2y {
|
|
3660
3702
|
background-color: var(--oziko-color-input-background);
|
|
3661
3703
|
border-radius: var(--oziko-border-radius-md);
|