akeyless-client-commons 1.0.151 → 1.0.153
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.
|
@@ -313,7 +313,6 @@ interface ModularFormProps {
|
|
|
313
313
|
buttonContent: React.ReactNode;
|
|
314
314
|
headerContent?: React.ReactNode;
|
|
315
315
|
buttonClassName?: string;
|
|
316
|
-
formClassName?: string;
|
|
317
316
|
headerClassName?: string;
|
|
318
317
|
direction?: Direction;
|
|
319
318
|
submitRef?: React.MutableRefObject<HTMLButtonElement | null>;
|
|
@@ -323,6 +322,8 @@ interface ModularFormProps {
|
|
|
323
322
|
onLoad?: (e: EventTarget & HTMLFormElement) => void;
|
|
324
323
|
autoFixLabelsWidth?: boolean;
|
|
325
324
|
loaderProps?: LoaderProps;
|
|
325
|
+
elementsContainerClassName?: string;
|
|
326
|
+
className?: string;
|
|
326
327
|
}
|
|
327
328
|
interface ConfirmFormProps {
|
|
328
329
|
onV: () => Promise<void> | void;
|
|
@@ -547,7 +548,7 @@ declare const TableProvider: (props: TableProps & {
|
|
|
547
548
|
}) => react_jsx_runtime.JSX.Element;
|
|
548
549
|
declare const Table: React__default.MemoExoticComponent<(props: TableProps) => react_jsx_runtime.JSX.Element>;
|
|
549
550
|
|
|
550
|
-
declare const ModularForm: ({ submitFunction, elements, headerContent, buttonContent,
|
|
551
|
+
declare const ModularForm: ({ submitFunction, elements, headerContent, buttonContent, className, elementsContainerClassName, headerClassName, direction, buttonClassName, submitRef, footerClassName, errorClassName, labelsCommonClassName, autoFixLabelsWidth, loaderProps, onLoad, }: ModularFormProps) => react_jsx_runtime.JSX.Element;
|
|
551
552
|
|
|
552
553
|
declare function InternationalPhonePicker({ setPhoneValue, phoneValue, placeholder, className, containerClassName, defaultCountry, flagContainerClassName, inputClassName, defaultValue, name, style, onEnter, labelContent, labelClassName, required, direction, defaultFocus, labelsCommonClassName, }: InternationalInputProps): react_jsx_runtime.JSX.Element;
|
|
553
554
|
|
|
@@ -313,7 +313,6 @@ interface ModularFormProps {
|
|
|
313
313
|
buttonContent: React.ReactNode;
|
|
314
314
|
headerContent?: React.ReactNode;
|
|
315
315
|
buttonClassName?: string;
|
|
316
|
-
formClassName?: string;
|
|
317
316
|
headerClassName?: string;
|
|
318
317
|
direction?: Direction;
|
|
319
318
|
submitRef?: React.MutableRefObject<HTMLButtonElement | null>;
|
|
@@ -323,6 +322,8 @@ interface ModularFormProps {
|
|
|
323
322
|
onLoad?: (e: EventTarget & HTMLFormElement) => void;
|
|
324
323
|
autoFixLabelsWidth?: boolean;
|
|
325
324
|
loaderProps?: LoaderProps;
|
|
325
|
+
elementsContainerClassName?: string;
|
|
326
|
+
className?: string;
|
|
326
327
|
}
|
|
327
328
|
interface ConfirmFormProps {
|
|
328
329
|
onV: () => Promise<void> | void;
|
|
@@ -547,7 +548,7 @@ declare const TableProvider: (props: TableProps & {
|
|
|
547
548
|
}) => react_jsx_runtime.JSX.Element;
|
|
548
549
|
declare const Table: React__default.MemoExoticComponent<(props: TableProps) => react_jsx_runtime.JSX.Element>;
|
|
549
550
|
|
|
550
|
-
declare const ModularForm: ({ submitFunction, elements, headerContent, buttonContent,
|
|
551
|
+
declare const ModularForm: ({ submitFunction, elements, headerContent, buttonContent, className, elementsContainerClassName, headerClassName, direction, buttonClassName, submitRef, footerClassName, errorClassName, labelsCommonClassName, autoFixLabelsWidth, loaderProps, onLoad, }: ModularFormProps) => react_jsx_runtime.JSX.Element;
|
|
551
552
|
|
|
552
553
|
declare function InternationalPhonePicker({ setPhoneValue, phoneValue, placeholder, className, containerClassName, defaultCountry, flagContainerClassName, inputClassName, defaultValue, name, style, onEnter, labelContent, labelClassName, required, direction, defaultFocus, labelsCommonClassName, }: InternationalInputProps): react_jsx_runtime.JSX.Element;
|
|
553
554
|
|
package/dist/components/index.js
CHANGED
|
@@ -6061,7 +6061,7 @@ var ModularForm = function(param) {
|
|
|
6061
6061
|
return function(form) {
|
|
6062
6062
|
return _ref.apply(this, arguments);
|
|
6063
6063
|
};
|
|
6064
|
-
}() : _param_submitFunction, _param_elements = param.elements, elements = _param_elements === void 0 ? [] : _param_elements, headerContent = param.headerContent, buttonContent = param.buttonContent,
|
|
6064
|
+
}() : _param_submitFunction, _param_elements = param.elements, elements = _param_elements === void 0 ? [] : _param_elements, headerContent = param.headerContent, buttonContent = param.buttonContent, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_elementsContainerClassName = param.elementsContainerClassName, elementsContainerClassName = _param_elementsContainerClassName === void 0 ? "" : _param_elementsContainerClassName, _param_headerClassName = param.headerClassName, headerClassName = _param_headerClassName === void 0 ? "" : _param_headerClassName, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, submitRef = param.submitRef, _param_footerClassName = param.footerClassName, footerClassName = _param_footerClassName === void 0 ? "" : _param_footerClassName, _param_errorClassName = param.errorClassName, errorClassName = _param_errorClassName === void 0 ? "" : _param_errorClassName, labelsCommonClassName = param.labelsCommonClassName, _param_autoFixLabelsWidth = param.autoFixLabelsWidth, autoFixLabelsWidth = _param_autoFixLabelsWidth === void 0 ? true : _param_autoFixLabelsWidth, loaderProps = param.loaderProps, onLoad = param.onLoad;
|
|
6065
6065
|
var _ref = _sliced_to_array((0, import_react14.useState)(""), 2), errorMsg = _ref[0], setErrorMsg = _ref[1];
|
|
6066
6066
|
var _ref1 = _sliced_to_array((0, import_react14.useState)(false), 2), isLoading = _ref1[0], setIsLoading = _ref1[1];
|
|
6067
6067
|
var formRef = (0, import_react14.useRef)(null);
|
|
@@ -6159,62 +6159,65 @@ var ModularForm = function(param) {
|
|
|
6159
6159
|
style: {
|
|
6160
6160
|
direction: direction
|
|
6161
6161
|
},
|
|
6162
|
-
className: cn("w-[350px] px-5 py-5 flex flex-col gap-
|
|
6162
|
+
className: cn("w-[350px] px-5 py-5 flex flex-col gap-4", className),
|
|
6163
6163
|
children: [
|
|
6164
6164
|
headerContent && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", {
|
|
6165
6165
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
6166
6166
|
children: headerContent
|
|
6167
6167
|
}),
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6168
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", {
|
|
6169
|
+
className: cn("w-full flex flex-col gap-5", elementsContainerClassName),
|
|
6170
|
+
children: elements.map(function(element, index2) {
|
|
6171
|
+
switch(element.type){
|
|
6172
|
+
case "input":
|
|
6173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InputContainer, _object_spread_props(_object_spread({}, element), {
|
|
6174
|
+
direction: direction,
|
|
6175
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6176
|
+
}), index2);
|
|
6177
|
+
case "textarea":
|
|
6178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
|
|
6179
|
+
direction: direction,
|
|
6180
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6181
|
+
}), index2);
|
|
6182
|
+
case "select":
|
|
6183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectContainer, _object_spread_props(_object_spread({}, element), {
|
|
6184
|
+
direction: direction,
|
|
6185
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6186
|
+
}), index2);
|
|
6187
|
+
case "checkbox":
|
|
6188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CheckboxContainer, _object_spread_props(_object_spread({}, element), {
|
|
6189
|
+
direction: direction,
|
|
6190
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6191
|
+
}), index2);
|
|
6192
|
+
case "multiSelect":
|
|
6193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MultiSelect, _object_spread_props(_object_spread({}, element), {
|
|
6194
|
+
direction: direction,
|
|
6195
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6196
|
+
}), index2);
|
|
6197
|
+
case "selectWithSearch":
|
|
6198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
|
|
6199
|
+
direction: direction,
|
|
6200
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6201
|
+
}), index2);
|
|
6202
|
+
case "internationalPhoneInput":
|
|
6203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
|
|
6204
|
+
direction: direction,
|
|
6205
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6206
|
+
}), index2);
|
|
6207
|
+
case "separator":
|
|
6208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormSeparator, _object_spread_props(_object_spread({}, element), {
|
|
6209
|
+
direction: direction,
|
|
6210
|
+
children: element.children
|
|
6211
|
+
}), index2);
|
|
6212
|
+
case "custom":
|
|
6213
|
+
var _element_element;
|
|
6214
|
+
return typeof ((_element_element = element.element) === null || _element_element === void 0 ? void 0 : _element_element.type) !== "string" && (0, import_react14.cloneElement)(element.element, {
|
|
6215
|
+
key: index2
|
|
6216
|
+
});
|
|
6217
|
+
default:
|
|
6218
|
+
return null;
|
|
6219
|
+
}
|
|
6220
|
+
})
|
|
6218
6221
|
}),
|
|
6219
6222
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", {
|
|
6220
6223
|
className: cn("flex justify-between w-full", footerClassName),
|
|
@@ -5848,7 +5848,7 @@ var ModularForm = function(param) {
|
|
|
5848
5848
|
return function(form) {
|
|
5849
5849
|
return _ref.apply(this, arguments);
|
|
5850
5850
|
};
|
|
5851
|
-
}() : _param_submitFunction, _param_elements = param.elements, elements = _param_elements === void 0 ? [] : _param_elements, headerContent = param.headerContent, buttonContent = param.buttonContent,
|
|
5851
|
+
}() : _param_submitFunction, _param_elements = param.elements, elements = _param_elements === void 0 ? [] : _param_elements, headerContent = param.headerContent, buttonContent = param.buttonContent, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_elementsContainerClassName = param.elementsContainerClassName, elementsContainerClassName = _param_elementsContainerClassName === void 0 ? "" : _param_elementsContainerClassName, _param_headerClassName = param.headerClassName, headerClassName = _param_headerClassName === void 0 ? "" : _param_headerClassName, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, submitRef = param.submitRef, _param_footerClassName = param.footerClassName, footerClassName = _param_footerClassName === void 0 ? "" : _param_footerClassName, _param_errorClassName = param.errorClassName, errorClassName = _param_errorClassName === void 0 ? "" : _param_errorClassName, labelsCommonClassName = param.labelsCommonClassName, _param_autoFixLabelsWidth = param.autoFixLabelsWidth, autoFixLabelsWidth = _param_autoFixLabelsWidth === void 0 ? true : _param_autoFixLabelsWidth, loaderProps = param.loaderProps, onLoad = param.onLoad;
|
|
5852
5852
|
var _useState9 = _sliced_to_array(useState9(""), 2), errorMsg = _useState9[0], setErrorMsg = _useState9[1];
|
|
5853
5853
|
var _useState91 = _sliced_to_array(useState9(false), 2), isLoading = _useState91[0], setIsLoading = _useState91[1];
|
|
5854
5854
|
var formRef = useRef5(null);
|
|
@@ -5946,62 +5946,65 @@ var ModularForm = function(param) {
|
|
|
5946
5946
|
style: {
|
|
5947
5947
|
direction: direction
|
|
5948
5948
|
},
|
|
5949
|
-
className: cn("w-[350px] px-5 py-5 flex flex-col gap-
|
|
5949
|
+
className: cn("w-[350px] px-5 py-5 flex flex-col gap-4", className),
|
|
5950
5950
|
children: [
|
|
5951
5951
|
headerContent && /* @__PURE__ */ jsx20("div", {
|
|
5952
5952
|
className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
|
|
5953
5953
|
children: headerContent
|
|
5954
5954
|
}),
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
5955
|
+
/* @__PURE__ */ jsx20("div", {
|
|
5956
|
+
className: cn("w-full flex flex-col gap-5", elementsContainerClassName),
|
|
5957
|
+
children: elements.map(function(element, index2) {
|
|
5958
|
+
switch(element.type){
|
|
5959
|
+
case "input":
|
|
5960
|
+
return /* @__PURE__ */ jsx20(InputContainer, _object_spread_props(_object_spread({}, element), {
|
|
5961
|
+
direction: direction,
|
|
5962
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5963
|
+
}), index2);
|
|
5964
|
+
case "textarea":
|
|
5965
|
+
return /* @__PURE__ */ jsx20(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
|
|
5966
|
+
direction: direction,
|
|
5967
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5968
|
+
}), index2);
|
|
5969
|
+
case "select":
|
|
5970
|
+
return /* @__PURE__ */ jsx20(SelectContainer, _object_spread_props(_object_spread({}, element), {
|
|
5971
|
+
direction: direction,
|
|
5972
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5973
|
+
}), index2);
|
|
5974
|
+
case "checkbox":
|
|
5975
|
+
return /* @__PURE__ */ jsx20(CheckboxContainer, _object_spread_props(_object_spread({}, element), {
|
|
5976
|
+
direction: direction,
|
|
5977
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5978
|
+
}), index2);
|
|
5979
|
+
case "multiSelect":
|
|
5980
|
+
return /* @__PURE__ */ jsx20(MultiSelect, _object_spread_props(_object_spread({}, element), {
|
|
5981
|
+
direction: direction,
|
|
5982
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5983
|
+
}), index2);
|
|
5984
|
+
case "selectWithSearch":
|
|
5985
|
+
return /* @__PURE__ */ jsx20(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
|
|
5986
|
+
direction: direction,
|
|
5987
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5988
|
+
}), index2);
|
|
5989
|
+
case "internationalPhoneInput":
|
|
5990
|
+
return /* @__PURE__ */ jsx20(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
|
|
5991
|
+
direction: direction,
|
|
5992
|
+
labelsCommonClassName: labelsCommonClassName
|
|
5993
|
+
}), index2);
|
|
5994
|
+
case "separator":
|
|
5995
|
+
return /* @__PURE__ */ jsx20(FormSeparator, _object_spread_props(_object_spread({}, element), {
|
|
5996
|
+
direction: direction,
|
|
5997
|
+
children: element.children
|
|
5998
|
+
}), index2);
|
|
5999
|
+
case "custom":
|
|
6000
|
+
var _element_element;
|
|
6001
|
+
return typeof ((_element_element = element.element) === null || _element_element === void 0 ? void 0 : _element_element.type) !== "string" && cloneElement(element.element, {
|
|
6002
|
+
key: index2
|
|
6003
|
+
});
|
|
6004
|
+
default:
|
|
6005
|
+
return null;
|
|
6006
|
+
}
|
|
6007
|
+
})
|
|
6005
6008
|
}),
|
|
6006
6009
|
/* @__PURE__ */ jsxs15("div", {
|
|
6007
6010
|
className: cn("flex justify-between w-full", footerClassName),
|
package/dist/types/index.d.mts
CHANGED
|
@@ -276,7 +276,6 @@ interface ModularFormProps {
|
|
|
276
276
|
buttonContent: React.ReactNode;
|
|
277
277
|
headerContent?: React.ReactNode;
|
|
278
278
|
buttonClassName?: string;
|
|
279
|
-
formClassName?: string;
|
|
280
279
|
headerClassName?: string;
|
|
281
280
|
direction?: Direction;
|
|
282
281
|
submitRef?: React.MutableRefObject<HTMLButtonElement | null>;
|
|
@@ -286,6 +285,8 @@ interface ModularFormProps {
|
|
|
286
285
|
onLoad?: (e: EventTarget & HTMLFormElement) => void;
|
|
287
286
|
autoFixLabelsWidth?: boolean;
|
|
288
287
|
loaderProps?: LoaderProps;
|
|
288
|
+
elementsContainerClassName?: string;
|
|
289
|
+
className?: string;
|
|
289
290
|
}
|
|
290
291
|
interface ConfirmFormProps {
|
|
291
292
|
onV: () => Promise<void> | void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -276,7 +276,6 @@ interface ModularFormProps {
|
|
|
276
276
|
buttonContent: React.ReactNode;
|
|
277
277
|
headerContent?: React.ReactNode;
|
|
278
278
|
buttonClassName?: string;
|
|
279
|
-
formClassName?: string;
|
|
280
279
|
headerClassName?: string;
|
|
281
280
|
direction?: Direction;
|
|
282
281
|
submitRef?: React.MutableRefObject<HTMLButtonElement | null>;
|
|
@@ -286,6 +285,8 @@ interface ModularFormProps {
|
|
|
286
285
|
onLoad?: (e: EventTarget & HTMLFormElement) => void;
|
|
287
286
|
autoFixLabelsWidth?: boolean;
|
|
288
287
|
loaderProps?: LoaderProps;
|
|
288
|
+
elementsContainerClassName?: string;
|
|
289
|
+
className?: string;
|
|
289
290
|
}
|
|
290
291
|
interface ConfirmFormProps {
|
|
291
292
|
onV: () => Promise<void> | void;
|