@luscii-healthtech/web-ui 18.1.0 → 19.0.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.
- package/dist/components/Form/FormImagePicker.d.ts +3 -3
- package/dist/components/Form/form.types.d.ts +6 -6
- package/dist/components/MediaPicker/MediaPicker.d.ts +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.development.js +18 -20
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui-tailwind.css +9 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Control, RegisterOptions } from "react-hook-form/dist/index.ie11";
|
|
3
|
-
import {
|
|
4
|
-
interface
|
|
3
|
+
import { MediaPickerFieldConfiguration, FormFieldLabelerWithFormProps } from "./form.types";
|
|
4
|
+
interface FormMediaPickerProps extends MediaPickerFieldConfiguration, FormFieldLabelerWithFormProps {
|
|
5
5
|
control: Control;
|
|
6
6
|
rules?: Exclude<RegisterOptions, "valueAsNumber" | "valueAsDate" | "setValueAs">;
|
|
7
7
|
}
|
|
8
|
-
export declare const FormImagePicker: React.ForwardRefExoticComponent<
|
|
8
|
+
export declare const FormImagePicker: React.ForwardRefExoticComponent<FormMediaPickerProps & React.RefAttributes<any>>;
|
|
9
9
|
export {};
|
|
@@ -3,7 +3,7 @@ import React, { HTMLInputTypeAttribute } from "react";
|
|
|
3
3
|
import { InputProps } from "../Input/Input";
|
|
4
4
|
import { RadioGroupProps } from "../RadioGroup/RadioGroupV2";
|
|
5
5
|
import { SelectProps } from "../Select/Select";
|
|
6
|
-
import {
|
|
6
|
+
import { MediaPickerProps } from "../MediaPicker/MediaPicker";
|
|
7
7
|
import { PartialProperties } from "../../types/general.types";
|
|
8
8
|
import { CheckboxProps } from "../Checkbox/Checkbox";
|
|
9
9
|
import { TextareaProps } from "../Textarea/Textarea";
|
|
@@ -32,7 +32,7 @@ export interface FormFieldLabelerProps {
|
|
|
32
32
|
interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
|
|
33
33
|
type: "void";
|
|
34
34
|
}
|
|
35
|
-
export type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration |
|
|
35
|
+
export type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldMediaPickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldTitleConfiguration | FieldVoidConfiguration;
|
|
36
36
|
/**
|
|
37
37
|
* @backwardscompatibility
|
|
38
38
|
* @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
|
|
@@ -60,10 +60,10 @@ export interface FieldSelectConfiguration extends FormFieldBaseConfiguration<Sel
|
|
|
60
60
|
type: "select";
|
|
61
61
|
fieldProps: SelectProps;
|
|
62
62
|
}
|
|
63
|
-
export type
|
|
64
|
-
export interface
|
|
65
|
-
type: "
|
|
66
|
-
fieldProps:
|
|
63
|
+
export type MediaPickerFieldConfiguration = PartialProperties<Omit<MediaPickerProps, "name">, "onChange">;
|
|
64
|
+
export interface FieldMediaPickerConfiguration extends FormFieldBaseConfiguration<MediaPickerFieldConfiguration> {
|
|
65
|
+
type: "mediaPicker";
|
|
66
|
+
fieldProps: MediaPickerFieldConfiguration;
|
|
67
67
|
}
|
|
68
68
|
export interface FieldCheckboxConfiguration extends FormFieldBaseConfiguration<Omit<CheckboxProps, "name" | "type">> {
|
|
69
69
|
type: "checkbox";
|
|
@@ -47,10 +47,6 @@ export interface ImagePickerProps {
|
|
|
47
47
|
export declare const ImagePickerInner: React.FC<ImagePickerProps & {
|
|
48
48
|
innerRef?: React.Ref<HTMLButtonElement>;
|
|
49
49
|
}>;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated Use MediaPicker instead
|
|
52
|
-
*/
|
|
53
|
-
export declare const ImagePicker: React.ForwardRefExoticComponent<ImagePickerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
54
50
|
export interface MediaPickerProps {
|
|
55
51
|
name: string;
|
|
56
52
|
media: string[];
|
|
@@ -92,4 +88,4 @@ export interface MediaPickerProps {
|
|
|
92
88
|
isErrorUploading?: boolean;
|
|
93
89
|
localisation: Partial<Record<"openModalButton" | "selectButton" | "error" | "upload" | "clearSelection" | "cancel" | "search" | "unsupportedMediaType" | "modalTitle", string>>;
|
|
94
90
|
}
|
|
95
|
-
export declare const MediaPicker:
|
|
91
|
+
export declare const MediaPicker: React.ForwardRefExoticComponent<MediaPickerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,6 @@ export { Spinner } from "./components/Spinner/Spinner";
|
|
|
52
52
|
export { Steps } from "./components/Steps/Steps";
|
|
53
53
|
export { default as Switcher } from "./components/Switcher/Switcher";
|
|
54
54
|
export { default as Image } from "./components/Image/Image";
|
|
55
|
-
export { ImagePicker } from "./components/MediaPicker/MediaPicker";
|
|
56
55
|
export { MediaPicker, TargetProps } from "./components/MediaPicker/MediaPicker";
|
|
57
56
|
export { default as Tabbar, TabbarProps, TabItemDetails, } from "./components/Tabbar/Tabbar";
|
|
58
57
|
export { Breadcrumbs, BreadcrumbProps } from "./components/Breadcrumbs";
|
|
@@ -4378,7 +4378,7 @@ RadioGroup.propTypes = {
|
|
|
4378
4378
|
onChange: PropTypes__default.default.func
|
|
4379
4379
|
};
|
|
4380
4380
|
|
|
4381
|
-
var css_248z$4 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section > .cweb-section-
|
|
4381
|
+
var css_248z$4 = "/**\n * --- DEPRECATED ---\n * DON'T USE ANYTHING FROM THIS FILE IN FUTURE CHANGES. WE SHOULD BE\n * USING TAILWIND CLASSES DIRECTLY IN OUR COMPONENTS.\n */\n.cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n.cweb-section > .cweb-section-footer img {\n width: 32px;\n height: 32px;\n}";
|
|
4382
4382
|
styleInject(css_248z$4);
|
|
4383
4383
|
|
|
4384
4384
|
function Section$1(_a) {
|
|
@@ -4388,7 +4388,7 @@ function Section$1(_a) {
|
|
|
4388
4388
|
Object.assign({}, restProps, { className: classNames__default.default("cweb-section", "ui-flex ui-flex-col ui-items-start ui-justify-start", "ui-rounded-lg", "ui-mx-0 ui-my-4", "ui-bg-white", "ui-w-full", className) }),
|
|
4389
4389
|
(title || buttons) && React__namespace.default.createElement(
|
|
4390
4390
|
"div",
|
|
4391
|
-
{ className: "cweb-section-header ui-gap-3", "data-test-id": "section-header" },
|
|
4391
|
+
{ className: "cweb-section-header ui-flex ui-w-full ui-items-center ui-justify-between ui-gap-3 ui-p-4", "data-test-id": "section-header" },
|
|
4392
4392
|
title && React__namespace.default.createElement(
|
|
4393
4393
|
"div",
|
|
4394
4394
|
{ className: "ui-flex ui-flex-1 ui-flex-row ui-items-center ui-gap-3" },
|
|
@@ -4398,8 +4398,10 @@ function Section$1(_a) {
|
|
|
4398
4398
|
buttons && buttons.length > 0 && React__namespace.default.createElement("div", { className: classNames__default.default("cweb-section-header-buttons-container", "ui-flex ui-flex-row ui-space-x-3") }, buttons.map((button) => React__namespace.default.createElement(Button, Object.assign({}, button, { key: button.key || button.id || button.text })))),
|
|
4399
4399
|
headerAside && React__namespace.default.createElement("div", null, headerAside)
|
|
4400
4400
|
),
|
|
4401
|
-
React__namespace.default.createElement("div", { className: "cweb-section-content ui-w-full"
|
|
4402
|
-
|
|
4401
|
+
React__namespace.default.createElement("div", { className: classNames__default.default("cweb-section-content ui-w-full", {
|
|
4402
|
+
"ui-border-t-1 ui-border-t-slate-200": children
|
|
4403
|
+
}) }, !isLoading && children),
|
|
4404
|
+
footer && React__namespace.default.createElement("div", { className: "ui-flex ui-w-full ui-flex-row ui-items-center ui-justify-between ui-border-t-slate-200 ui-p-4" }, footer)
|
|
4403
4405
|
);
|
|
4404
4406
|
}
|
|
4405
4407
|
|
|
@@ -4810,12 +4812,11 @@ const ImagePickerInner = ({
|
|
|
4810
4812
|
)
|
|
4811
4813
|
);
|
|
4812
4814
|
};
|
|
4813
|
-
const
|
|
4814
|
-
const MediaPicker = (props) => {
|
|
4815
|
+
const MediaPicker = React__namespace.default.forwardRef((props, ref) => {
|
|
4815
4816
|
var _a, _b;
|
|
4816
4817
|
const mappedProps = Object.assign(Object.assign({}, props), { preselectedImage: props.preselectedMedia, images: props.media, handleChange: props.onChange, clearImageIndex: props.clearIndex, localisation: Object.assign(Object.assign({}, props.localisation), { uploadImage: (_b = (_a = props.localisation) === null || _a === void 0 ? void 0 : _a.upload) !== null && _b !== void 0 ? _b : "Upload file" }) });
|
|
4817
|
-
return React__namespace.default.createElement(
|
|
4818
|
-
};
|
|
4818
|
+
return React__namespace.default.createElement(ImagePickerInner, Object.assign({}, mappedProps, { innerRef: ref }));
|
|
4819
|
+
});
|
|
4819
4820
|
|
|
4820
4821
|
const TagGroup = ({ children, tags, tagSize = "base", className }) => React__namespace.default.createElement(
|
|
4821
4822
|
"div",
|
|
@@ -5121,18 +5122,16 @@ const FormImagePicker = React__namespace.default.forwardRef((_a, innerRef) => {
|
|
|
5121
5122
|
{ name, fieldErrors, fieldRequired, label, info, decoratorClassname },
|
|
5122
5123
|
React__namespace.default.createElement(index_ie11.Controller, { name, control, rules, render: (field) => {
|
|
5123
5124
|
var _a2;
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
}, []);
|
|
5131
|
-
return React__namespace.default.createElement(ImagePicker, Object.assign({}, fieldProps, field, { handleChange: (e) => {
|
|
5125
|
+
if (fieldProps.preselectedMedia && !field.value) {
|
|
5126
|
+
field.onChange({
|
|
5127
|
+
target: { name, value: fieldProps.preselectedMedia }
|
|
5128
|
+
});
|
|
5129
|
+
}
|
|
5130
|
+
return React__namespace.default.createElement(MediaPicker, Object.assign({}, fieldProps, field, { media: fieldProps.media, onChange: (e) => {
|
|
5132
5131
|
var _a3;
|
|
5133
5132
|
field.onChange(e.target.value);
|
|
5134
|
-
(_a3 = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.
|
|
5135
|
-
},
|
|
5133
|
+
(_a3 = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.onChange) === null || _a3 === void 0 ? void 0 : _a3.call(fieldProps, e);
|
|
5134
|
+
}, preselectedMedia: (_a2 = field.value) !== null && _a2 !== void 0 ? _a2 : fieldProps.preselectedMedia, ref: innerRef }));
|
|
5136
5135
|
} })
|
|
5137
5136
|
);
|
|
5138
5137
|
});
|
|
@@ -5241,7 +5240,7 @@ function FormFieldMapper(formFieldProps, useFormReturn) {
|
|
|
5241
5240
|
return React__namespace.default.createElement(FormInput, Object.assign({ key: name, name }, decoratorProps, { fieldRequired: isRequired(options), fieldErrors: errors }, fieldProps, { control, rules: options, type }));
|
|
5242
5241
|
case "select":
|
|
5243
5242
|
return React__namespace.default.createElement(FormSelect, Object.assign({ key: name }, decoratorProps, { fieldRequired: isRequired(options), fieldErrors: errors }, fieldProps, { control, rules: options, name }));
|
|
5244
|
-
case "
|
|
5243
|
+
case "mediaPicker":
|
|
5245
5244
|
return React__namespace.default.createElement(FormImagePicker, Object.assign({ key: name }, decoratorProps, { fieldRequired: isRequired(options), fieldErrors: errors }, fieldProps, { control, rules: options, name }));
|
|
5246
5245
|
case "radioGroup": {
|
|
5247
5246
|
return React__namespace.default.createElement(FormRadioGroup, Object.assign({ key: name }, decoratorProps, { fieldRequired: isRequired(options), fieldErrors: errors }, fieldProps, { name, rules: options, control }));
|
|
@@ -5763,7 +5762,6 @@ exports.HeartIcon = HeartIcon;
|
|
|
5763
5762
|
exports.Icon = Icon;
|
|
5764
5763
|
exports.Image = Image$1;
|
|
5765
5764
|
exports.ImageIcon = ImageIcon;
|
|
5766
|
-
exports.ImagePicker = ImagePicker;
|
|
5767
5765
|
exports.InfoField = InfoField;
|
|
5768
5766
|
exports.InfoIcon = InfoIcon;
|
|
5769
5767
|
exports.Input = Input;
|