@lets-events/react 12.6.4 → 12.7.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +38 -23
- package/dist/index.mjs +32 -18
- package/package.json +1 -1
- package/src/components/RichEditor/RichTextPresenter.tsx +18 -0
- package/src/components/RichEditor/index.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @lets-events/react@12.
|
|
2
|
+
> @lets-events/react@12.7.0 build
|
|
3
3
|
> tsup src/index.tsx --format esm,cjs --dts --external react
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
[34mCLI[39m Target: es6
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
|
-
[32mCJS[39m [1mdist\index.js [22m[32m404.
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m389.
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist\index.js [22m[32m404.80 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 204ms
|
|
14
|
+
[32mESM[39m [1mdist\index.mjs [22m[32m389.71 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 205ms
|
|
16
16
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist\index.d.mts [22m[
|
|
19
|
-
[32mDTS[39m [1mdist\index.d.ts [22m[
|
|
17
|
+
[32mDTS[39m ⚡️ Build success in 4513ms
|
|
18
|
+
[32mDTS[39m [1mdist\index.d.mts [22m[32m403.02 KB[39m
|
|
19
|
+
[32mDTS[39m [1mdist\index.d.ts [22m[32m403.02 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -15298,6 +15298,11 @@ interface RichEditorProps {
|
|
|
15298
15298
|
}
|
|
15299
15299
|
declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
|
|
15300
15300
|
|
|
15301
|
+
type Props = {
|
|
15302
|
+
richText: string;
|
|
15303
|
+
};
|
|
15304
|
+
declare const RichTextPresenter: ({ richText }: Props) => react_jsx_runtime.JSX.Element;
|
|
15305
|
+
|
|
15301
15306
|
type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
15302
15307
|
name: string;
|
|
15303
15308
|
label?: string;
|
|
@@ -15400,4 +15405,4 @@ declare const useImageUpload: (options: UseImageUploadOptions) => {
|
|
|
15400
15405
|
reset: () => void;
|
|
15401
15406
|
};
|
|
15402
15407
|
|
|
15403
|
-
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, EmailFormField, type EmailFormFieldProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, type IconProps, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
|
15408
|
+
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, EmailFormField, type EmailFormFieldProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, type IconProps, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -15298,6 +15298,11 @@ interface RichEditorProps {
|
|
|
15298
15298
|
}
|
|
15299
15299
|
declare const RichEditor: (props: RichEditorProps) => react_jsx_runtime.JSX.Element | null;
|
|
15300
15300
|
|
|
15301
|
+
type Props = {
|
|
15302
|
+
richText: string;
|
|
15303
|
+
};
|
|
15304
|
+
declare const RichTextPresenter: ({ richText }: Props) => react_jsx_runtime.JSX.Element;
|
|
15305
|
+
|
|
15301
15306
|
type RichEditorFormFieldProps = Omit<RichEditorProps, "value" | "onChange"> & {
|
|
15302
15307
|
name: string;
|
|
15303
15308
|
label?: string;
|
|
@@ -15400,4 +15405,4 @@ declare const useImageUpload: (options: UseImageUploadOptions) => {
|
|
|
15400
15405
|
reset: () => void;
|
|
15401
15406
|
};
|
|
15402
15407
|
|
|
15403
|
-
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, EmailFormField, type EmailFormFieldProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, type IconProps, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
|
15408
|
+
export { AddressFormFields, Alert, AlertDialogCompleteStyled, AlertDialogDescriptionStyled, AlertDialogRowStyled, AlertDialogSimpleStyled, AlertDialogSubtitleStyled, AlertDialogTitleStyled, AlertDialoghrStyled, type AlertProps, Avatar, type AvatarProps, AvatarStyled, Badge, type BadgeProps, BadgeStyled, BirthDateFormField, Box, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupStyled, ButtonItem, type ButtonItemProps, ButtonItemStyled, type ButtonProps, CNPJFormField, CPFFormField, Calendar, CalendarFormField, type CalendarFormFieldProps, type CalendarProps, Card, type CardProps, CardStyled, CheckboxGroup, CheckboxGroupFormField, type CheckboxGroupFormFieldProps, type CheckboxGroupProps, CheckboxGroupStyled, CheckboxItem, type CheckboxItemProps, Container, type ContainerProps, ContainerStyled, CountryFormField, type DateRange, Divider, DoubleCalendar, DoubleCalendarFormField, type DoubleCalendarFormFieldProps, type DoubleCalendarProps, Drawer, type DrawerProps, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, EmailFormField, type EmailFormFieldProps, ErrorFormMessage, type ErrorFormMessageProps, Filter, FilterItem, type FilterItemProps, type FilterProps, Flex, type FlexProps, FlexStyled, Form, FormLabel, type FormLabelProps, type FormProps, Grid, type GridProps, GridStyled, Icon, type IconProps, IdentityDocumentNumberFormField, InputStyled, MenuDropdown, type MenuDropdownProps, Modal, type ModalProps, MultiSelect, MultiSelectFormField, type MultiSelectFormFieldProps, type MultiSelectProps, PhoneFormField, type PhoneFormFieldProps, RadioGroup, RadioGroupFormField, type RadioGroupFormFieldProps, type RadioGroupProps, RadioGroupStyled, RadioItem, type RadioItemProps, RichEditor, RichEditorFormField, type RichEditorFormFieldProps, type RichEditorProps, RichTextPresenter, Section, type SectionProps, SectionStyled, SelectFormField, type SelectFormFieldProps, Step, StepContent, StepList, type StepProps, StepStyled, StepTrigger, StepWrapper, Switch, SwitchFormField, type SwitchFormFieldProps, type SwitchProps, SwitchStyled, Text, TextAreaFormField, type TextAreaFormFieldProps, TextField, type TextFieldProps, TextFieldSlot, type TextFieldSlotProps, TextFieldSlotStyled, TextFieldStyled, TextFormField, type TextFormFieldProps, type TextProps, TextStyle, TextareaField, type TextareaFieldProps, TextareaFieldStyle, TimePicker, TimePickerButtonStyled, TimePickerDropdownStyled, TimePickerFooterStyled, TimePickerFormField, type TimePickerFormFieldProps, TimePickerIconButton, type TimePickerProps, TimePickerStyled, TimerPickerContentStyled, type Toast, type ToastComponentProps, type ToastConfig, type ToastContextType, ToastItem, type ToastOptions, ToastProvider, type ToastProviderProps, type ToastType, type ToasterShowOptions, Tooltip, TooltipContent, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UploadConfig, UploadService, isValidCNPJ, maskFormat, maskUnformat, useImageUpload, useToast };
|
package/dist/index.js
CHANGED
|
@@ -925,6 +925,7 @@ __export(index_exports, {
|
|
|
925
925
|
RadioItem: () => RadioItem,
|
|
926
926
|
RichEditor: () => RichEditor_default,
|
|
927
927
|
RichEditorFormField: () => RichEditorFormField,
|
|
928
|
+
RichTextPresenter: () => RichTextPresenter_default,
|
|
928
929
|
Section: () => Section,
|
|
929
930
|
SectionStyled: () => SectionStyled,
|
|
930
931
|
SelectFormField: () => SelectFormField,
|
|
@@ -12917,9 +12918,22 @@ var RichEditor = (props) => {
|
|
|
12917
12918
|
};
|
|
12918
12919
|
var RichEditor_default = RichEditor;
|
|
12919
12920
|
|
|
12921
|
+
// src/components/RichEditor/RichTextPresenter.tsx
|
|
12922
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12923
|
+
var RichTextPresenter = ({ richText }) => {
|
|
12924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(QuillEditor, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12925
|
+
"div",
|
|
12926
|
+
{
|
|
12927
|
+
className: "ql-editor",
|
|
12928
|
+
dangerouslySetInnerHTML: { __html: richText }
|
|
12929
|
+
}
|
|
12930
|
+
) });
|
|
12931
|
+
};
|
|
12932
|
+
var RichTextPresenter_default = RichTextPresenter;
|
|
12933
|
+
|
|
12920
12934
|
// src/components/FormFields/RichEditorFormField.tsx
|
|
12921
12935
|
var import_react24 = require("react");
|
|
12922
|
-
var
|
|
12936
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
12923
12937
|
var RichEditorFormField = (_a) => {
|
|
12924
12938
|
var _b = _a, {
|
|
12925
12939
|
name,
|
|
@@ -12962,9 +12976,9 @@ var RichEditorFormField = (_a) => {
|
|
|
12962
12976
|
const fieldError = fieldState.error;
|
|
12963
12977
|
const haveError = !!fieldError;
|
|
12964
12978
|
const errorMsg = fieldError == null ? void 0 : fieldError.message;
|
|
12965
|
-
return /* @__PURE__ */ (0,
|
|
12966
|
-
maxLength ? /* @__PURE__ */ (0,
|
|
12967
|
-
label && /* @__PURE__ */ (0,
|
|
12979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { direction: "column", children: [
|
|
12980
|
+
maxLength ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Flex, { direction: "row", justify: "between", children: [
|
|
12981
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12968
12982
|
FormLabel,
|
|
12969
12983
|
{
|
|
12970
12984
|
name,
|
|
@@ -12973,8 +12987,8 @@ var RichEditorFormField = (_a) => {
|
|
|
12973
12987
|
haveError
|
|
12974
12988
|
}
|
|
12975
12989
|
),
|
|
12976
|
-
/* @__PURE__ */ (0,
|
|
12977
|
-
] }) : /* @__PURE__ */ (0,
|
|
12990
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge, { color: "grey", size: "xs", children: caracterQuantity })
|
|
12991
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12978
12992
|
FormLabel,
|
|
12979
12993
|
{
|
|
12980
12994
|
name,
|
|
@@ -12983,7 +12997,7 @@ var RichEditorFormField = (_a) => {
|
|
|
12983
12997
|
haveError
|
|
12984
12998
|
}
|
|
12985
12999
|
) }),
|
|
12986
|
-
/* @__PURE__ */ (0,
|
|
13000
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12987
13001
|
RichEditor_default,
|
|
12988
13002
|
__spreadProps(__spreadValues({}, props), {
|
|
12989
13003
|
value: field.value,
|
|
@@ -12995,14 +13009,14 @@ var RichEditorFormField = (_a) => {
|
|
|
12995
13009
|
simpleVersion
|
|
12996
13010
|
})
|
|
12997
13011
|
),
|
|
12998
|
-
/* @__PURE__ */ (0,
|
|
13012
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
12999
13013
|
] });
|
|
13000
13014
|
};
|
|
13001
13015
|
|
|
13002
13016
|
// src/components/FormFields/CalendarFormField.tsx
|
|
13003
13017
|
var import_react_hook_form13 = require("react-hook-form");
|
|
13004
13018
|
var import_react25 = require("react");
|
|
13005
|
-
var
|
|
13019
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
13006
13020
|
var CalendarFormField = (_a) => {
|
|
13007
13021
|
var _b = _a, {
|
|
13008
13022
|
name,
|
|
@@ -13051,8 +13065,8 @@ var CalendarFormField = (_a) => {
|
|
|
13051
13065
|
const handleCalendarChange = (date) => {
|
|
13052
13066
|
setSelected(date);
|
|
13053
13067
|
};
|
|
13054
|
-
return /* @__PURE__ */ (0,
|
|
13055
|
-
label && /* @__PURE__ */ (0,
|
|
13068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
13069
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13056
13070
|
FormLabel,
|
|
13057
13071
|
{
|
|
13058
13072
|
name,
|
|
@@ -13061,7 +13075,7 @@ var CalendarFormField = (_a) => {
|
|
|
13061
13075
|
haveError
|
|
13062
13076
|
}
|
|
13063
13077
|
),
|
|
13064
|
-
/* @__PURE__ */ (0,
|
|
13078
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13065
13079
|
Calendar,
|
|
13066
13080
|
__spreadValues({
|
|
13067
13081
|
selected,
|
|
@@ -13074,14 +13088,14 @@ var CalendarFormField = (_a) => {
|
|
|
13074
13088
|
maxYearsFromNow
|
|
13075
13089
|
}, calendarProps)
|
|
13076
13090
|
),
|
|
13077
|
-
/* @__PURE__ */ (0,
|
|
13091
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
13078
13092
|
] });
|
|
13079
13093
|
};
|
|
13080
13094
|
|
|
13081
13095
|
// src/components/FormFields/DoubleCalendarFormField.tsx
|
|
13082
13096
|
var import_react26 = require("react");
|
|
13083
13097
|
var import_react_hook_form14 = require("react-hook-form");
|
|
13084
|
-
var
|
|
13098
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
13085
13099
|
var DoubleCalendarFormField = (_a) => {
|
|
13086
13100
|
var _b = _a, {
|
|
13087
13101
|
name,
|
|
@@ -13130,9 +13144,9 @@ var DoubleCalendarFormField = (_a) => {
|
|
|
13130
13144
|
const handleCalendarChange = (range) => {
|
|
13131
13145
|
setSelected(range);
|
|
13132
13146
|
};
|
|
13133
|
-
return /* @__PURE__ */ (0,
|
|
13134
|
-
label && /* @__PURE__ */ (0,
|
|
13135
|
-
/* @__PURE__ */ (0,
|
|
13147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
13148
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FormLabel, { name, label, required, haveError }),
|
|
13149
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13136
13150
|
DoubleCalendar,
|
|
13137
13151
|
__spreadValues({
|
|
13138
13152
|
selected,
|
|
@@ -13146,14 +13160,14 @@ var DoubleCalendarFormField = (_a) => {
|
|
|
13146
13160
|
maxYearsFromNow
|
|
13147
13161
|
}, calendarProps)
|
|
13148
13162
|
),
|
|
13149
|
-
/* @__PURE__ */ (0,
|
|
13163
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
13150
13164
|
] });
|
|
13151
13165
|
};
|
|
13152
13166
|
|
|
13153
13167
|
// src/components/FormFields/TimePickerFormField.tsx
|
|
13154
13168
|
var import_react_hook_form15 = require("react-hook-form");
|
|
13155
13169
|
var import_react27 = require("react");
|
|
13156
|
-
var
|
|
13170
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
13157
13171
|
var TimePickerFormField = (_a) => {
|
|
13158
13172
|
var _b = _a, {
|
|
13159
13173
|
name,
|
|
@@ -13196,8 +13210,8 @@ var TimePickerFormField = (_a) => {
|
|
|
13196
13210
|
const handleTimePickerChange = (time) => {
|
|
13197
13211
|
setSelected(time);
|
|
13198
13212
|
};
|
|
13199
|
-
return /* @__PURE__ */ (0,
|
|
13200
|
-
label && /* @__PURE__ */ (0,
|
|
13213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
13214
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13201
13215
|
FormLabel,
|
|
13202
13216
|
{
|
|
13203
13217
|
name,
|
|
@@ -13206,7 +13220,7 @@ var TimePickerFormField = (_a) => {
|
|
|
13206
13220
|
haveError
|
|
13207
13221
|
}
|
|
13208
13222
|
),
|
|
13209
|
-
/* @__PURE__ */ (0,
|
|
13223
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13210
13224
|
TimePicker,
|
|
13211
13225
|
__spreadValues({
|
|
13212
13226
|
selected,
|
|
@@ -13217,7 +13231,7 @@ var TimePickerFormField = (_a) => {
|
|
|
13217
13231
|
hasError: haveError
|
|
13218
13232
|
}, timePickerProps)
|
|
13219
13233
|
),
|
|
13220
|
-
/* @__PURE__ */ (0,
|
|
13234
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ErrorFormMessage, { message: errorMsg })
|
|
13221
13235
|
] });
|
|
13222
13236
|
};
|
|
13223
13237
|
|
|
@@ -13385,6 +13399,7 @@ var useImageUpload = (options) => {
|
|
|
13385
13399
|
RadioItem,
|
|
13386
13400
|
RichEditor,
|
|
13387
13401
|
RichEditorFormField,
|
|
13402
|
+
RichTextPresenter,
|
|
13388
13403
|
Section,
|
|
13389
13404
|
SectionStyled,
|
|
13390
13405
|
SelectFormField,
|
package/dist/index.mjs
CHANGED
|
@@ -12812,9 +12812,22 @@ var RichEditor = (props) => {
|
|
|
12812
12812
|
};
|
|
12813
12813
|
var RichEditor_default = RichEditor;
|
|
12814
12814
|
|
|
12815
|
+
// src/components/RichEditor/RichTextPresenter.tsx
|
|
12816
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
12817
|
+
var RichTextPresenter = ({ richText }) => {
|
|
12818
|
+
return /* @__PURE__ */ jsx54(QuillEditor, { children: /* @__PURE__ */ jsx54(
|
|
12819
|
+
"div",
|
|
12820
|
+
{
|
|
12821
|
+
className: "ql-editor",
|
|
12822
|
+
dangerouslySetInnerHTML: { __html: richText }
|
|
12823
|
+
}
|
|
12824
|
+
) });
|
|
12825
|
+
};
|
|
12826
|
+
var RichTextPresenter_default = RichTextPresenter;
|
|
12827
|
+
|
|
12815
12828
|
// src/components/FormFields/RichEditorFormField.tsx
|
|
12816
12829
|
import { useState as useState12 } from "react";
|
|
12817
|
-
import { Fragment as Fragment5, jsx as
|
|
12830
|
+
import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
12818
12831
|
var RichEditorFormField = (_a) => {
|
|
12819
12832
|
var _b = _a, {
|
|
12820
12833
|
name,
|
|
@@ -12859,7 +12872,7 @@ var RichEditorFormField = (_a) => {
|
|
|
12859
12872
|
const errorMsg = fieldError == null ? void 0 : fieldError.message;
|
|
12860
12873
|
return /* @__PURE__ */ jsxs29(Flex, { direction: "column", children: [
|
|
12861
12874
|
maxLength ? /* @__PURE__ */ jsxs29(Flex, { direction: "row", justify: "between", children: [
|
|
12862
|
-
label && /* @__PURE__ */
|
|
12875
|
+
label && /* @__PURE__ */ jsx55(
|
|
12863
12876
|
FormLabel,
|
|
12864
12877
|
{
|
|
12865
12878
|
name,
|
|
@@ -12868,8 +12881,8 @@ var RichEditorFormField = (_a) => {
|
|
|
12868
12881
|
haveError
|
|
12869
12882
|
}
|
|
12870
12883
|
),
|
|
12871
|
-
/* @__PURE__ */
|
|
12872
|
-
] }) : /* @__PURE__ */
|
|
12884
|
+
/* @__PURE__ */ jsx55(Badge, { color: "grey", size: "xs", children: caracterQuantity })
|
|
12885
|
+
] }) : /* @__PURE__ */ jsx55(Fragment5, { children: label && /* @__PURE__ */ jsx55(
|
|
12873
12886
|
FormLabel,
|
|
12874
12887
|
{
|
|
12875
12888
|
name,
|
|
@@ -12878,7 +12891,7 @@ var RichEditorFormField = (_a) => {
|
|
|
12878
12891
|
haveError
|
|
12879
12892
|
}
|
|
12880
12893
|
) }),
|
|
12881
|
-
/* @__PURE__ */
|
|
12894
|
+
/* @__PURE__ */ jsx55(
|
|
12882
12895
|
RichEditor_default,
|
|
12883
12896
|
__spreadProps(__spreadValues({}, props), {
|
|
12884
12897
|
value: field.value,
|
|
@@ -12890,14 +12903,14 @@ var RichEditorFormField = (_a) => {
|
|
|
12890
12903
|
simpleVersion
|
|
12891
12904
|
})
|
|
12892
12905
|
),
|
|
12893
|
-
/* @__PURE__ */
|
|
12906
|
+
/* @__PURE__ */ jsx55(ErrorFormMessage, { message: errorMsg })
|
|
12894
12907
|
] });
|
|
12895
12908
|
};
|
|
12896
12909
|
|
|
12897
12910
|
// src/components/FormFields/CalendarFormField.tsx
|
|
12898
12911
|
import { useController as useController4 } from "react-hook-form";
|
|
12899
12912
|
import { useCallback as useCallback5 } from "react";
|
|
12900
|
-
import { jsx as
|
|
12913
|
+
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
12901
12914
|
var CalendarFormField = (_a) => {
|
|
12902
12915
|
var _b = _a, {
|
|
12903
12916
|
name,
|
|
@@ -12947,7 +12960,7 @@ var CalendarFormField = (_a) => {
|
|
|
12947
12960
|
setSelected(date);
|
|
12948
12961
|
};
|
|
12949
12962
|
return /* @__PURE__ */ jsxs30(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
12950
|
-
label && /* @__PURE__ */
|
|
12963
|
+
label && /* @__PURE__ */ jsx56(
|
|
12951
12964
|
FormLabel,
|
|
12952
12965
|
{
|
|
12953
12966
|
name,
|
|
@@ -12956,7 +12969,7 @@ var CalendarFormField = (_a) => {
|
|
|
12956
12969
|
haveError
|
|
12957
12970
|
}
|
|
12958
12971
|
),
|
|
12959
|
-
/* @__PURE__ */
|
|
12972
|
+
/* @__PURE__ */ jsx56(
|
|
12960
12973
|
Calendar,
|
|
12961
12974
|
__spreadValues({
|
|
12962
12975
|
selected,
|
|
@@ -12969,14 +12982,14 @@ var CalendarFormField = (_a) => {
|
|
|
12969
12982
|
maxYearsFromNow
|
|
12970
12983
|
}, calendarProps)
|
|
12971
12984
|
),
|
|
12972
|
-
/* @__PURE__ */
|
|
12985
|
+
/* @__PURE__ */ jsx56(ErrorFormMessage, { message: errorMsg })
|
|
12973
12986
|
] });
|
|
12974
12987
|
};
|
|
12975
12988
|
|
|
12976
12989
|
// src/components/FormFields/DoubleCalendarFormField.tsx
|
|
12977
12990
|
import { useCallback as useCallback6 } from "react";
|
|
12978
12991
|
import { useController as useController5 } from "react-hook-form";
|
|
12979
|
-
import { jsx as
|
|
12992
|
+
import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
12980
12993
|
var DoubleCalendarFormField = (_a) => {
|
|
12981
12994
|
var _b = _a, {
|
|
12982
12995
|
name,
|
|
@@ -13026,8 +13039,8 @@ var DoubleCalendarFormField = (_a) => {
|
|
|
13026
13039
|
setSelected(range);
|
|
13027
13040
|
};
|
|
13028
13041
|
return /* @__PURE__ */ jsxs31(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
13029
|
-
label && /* @__PURE__ */
|
|
13030
|
-
/* @__PURE__ */
|
|
13042
|
+
label && /* @__PURE__ */ jsx57(FormLabel, { name, label, required, haveError }),
|
|
13043
|
+
/* @__PURE__ */ jsx57(
|
|
13031
13044
|
DoubleCalendar,
|
|
13032
13045
|
__spreadValues({
|
|
13033
13046
|
selected,
|
|
@@ -13041,14 +13054,14 @@ var DoubleCalendarFormField = (_a) => {
|
|
|
13041
13054
|
maxYearsFromNow
|
|
13042
13055
|
}, calendarProps)
|
|
13043
13056
|
),
|
|
13044
|
-
/* @__PURE__ */
|
|
13057
|
+
/* @__PURE__ */ jsx57(ErrorFormMessage, { message: errorMsg })
|
|
13045
13058
|
] });
|
|
13046
13059
|
};
|
|
13047
13060
|
|
|
13048
13061
|
// src/components/FormFields/TimePickerFormField.tsx
|
|
13049
13062
|
import { useController as useController6 } from "react-hook-form";
|
|
13050
13063
|
import { useCallback as useCallback7 } from "react";
|
|
13051
|
-
import { jsx as
|
|
13064
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
13052
13065
|
var TimePickerFormField = (_a) => {
|
|
13053
13066
|
var _b = _a, {
|
|
13054
13067
|
name,
|
|
@@ -13092,7 +13105,7 @@ var TimePickerFormField = (_a) => {
|
|
|
13092
13105
|
setSelected(time);
|
|
13093
13106
|
};
|
|
13094
13107
|
return /* @__PURE__ */ jsxs32(Flex, { direction: "column", style: { flex: "1" }, children: [
|
|
13095
|
-
label && /* @__PURE__ */
|
|
13108
|
+
label && /* @__PURE__ */ jsx58(
|
|
13096
13109
|
FormLabel,
|
|
13097
13110
|
{
|
|
13098
13111
|
name,
|
|
@@ -13101,7 +13114,7 @@ var TimePickerFormField = (_a) => {
|
|
|
13101
13114
|
haveError
|
|
13102
13115
|
}
|
|
13103
13116
|
),
|
|
13104
|
-
/* @__PURE__ */
|
|
13117
|
+
/* @__PURE__ */ jsx58(
|
|
13105
13118
|
TimePicker,
|
|
13106
13119
|
__spreadValues({
|
|
13107
13120
|
selected,
|
|
@@ -13112,7 +13125,7 @@ var TimePickerFormField = (_a) => {
|
|
|
13112
13125
|
hasError: haveError
|
|
13113
13126
|
}, timePickerProps)
|
|
13114
13127
|
),
|
|
13115
|
-
/* @__PURE__ */
|
|
13128
|
+
/* @__PURE__ */ jsx58(ErrorFormMessage, { message: errorMsg })
|
|
13116
13129
|
] });
|
|
13117
13130
|
};
|
|
13118
13131
|
|
|
@@ -13279,6 +13292,7 @@ export {
|
|
|
13279
13292
|
RadioItem,
|
|
13280
13293
|
RichEditor_default as RichEditor,
|
|
13281
13294
|
RichEditorFormField,
|
|
13295
|
+
RichTextPresenter_default as RichTextPresenter,
|
|
13282
13296
|
Section,
|
|
13283
13297
|
SectionStyled,
|
|
13284
13298
|
SelectFormField,
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { QuillEditor } from "./styledComponents";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
richText: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const RichTextPresenter = ({ richText }: Props) => {
|
|
8
|
+
return (
|
|
9
|
+
<QuillEditor>
|
|
10
|
+
<div
|
|
11
|
+
className="ql-editor"
|
|
12
|
+
dangerouslySetInnerHTML={{ __html: richText }}
|
|
13
|
+
/>
|
|
14
|
+
</QuillEditor>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default RichTextPresenter;
|