@m4l/components 0.2.25 → 0.2.27
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/@types/export.d.ts +3 -0
- package/components/AccountPopover/{index.505e278a.js → index.3994a80b.js} +2 -2
- package/components/AppBar/{index.7106417d.js → index.23323f96.js} +3 -4
- package/components/CommonActions/components/ActionCancel/{index.de862adf.js → index.bd767c14.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.3fd5c858.js → index.d737bddc.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.07394f62.js → index.d5b80747.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.79fc2386.js → index.9bd56cd0.js} +2 -2
- package/components/CommonActions/components/Actions/{index.2f6286eb.js → index.16946bfd.js} +12 -13
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.36270dd1.js → index.29cf6542.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.8b008692.js → index.2c4fd22e.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.cb308086.js → index.e30c976f.js} +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.f3d6036f.js → index.4335c26b.js} +1 -1
- package/components/DataGrid/{index.b1eafce1.js → index.a3792770.js} +4 -5
- package/components/DataGrid/subcomponents/Actions/{index.9af87fa1.js → index.a317b384.js} +11 -12
- package/components/DataGrid/subcomponents/editors/TextEditor/{index.91380a55.js → index.eac1749c.js} +12 -1
- package/components/DragResizeWindow/{index.051c743d.js → index.bf1a4a47.js} +2 -3
- package/components/DynamicFilter/{index.b93e5649.js → index.cce92677.js} +19 -17
- package/components/FieldLabel/FieldLabel.d.ts +2 -0
- package/components/FieldLabel/classes/constants.d.ts +1 -0
- package/components/FieldLabel/classes/index.d.ts +10 -0
- package/components/FieldLabel/classes/types.d.ts +11 -0
- package/components/FieldLabel/index.8d3d6bb4.js +82 -0
- package/components/FieldLabel/index.d.ts +1 -0
- package/components/FieldLabel/types.d.ts +8 -0
- package/components/GridLayout/subcomponents/Responsive/{index.0fd1b7f8.js → index.d2ec9ddb.js} +1 -0
- package/components/GridLayout/subcomponents/SizeProvider/{index.7669a2cd.js → index.06986ab4.js} +9 -5
- package/components/HamburgerMenu/{index.25029e23.js → index.06905db3.js} +2 -2
- package/components/Icon/{index.b920baf8.js → index.58eaf354.js} +8 -48
- package/components/Icon/types.d.ts +0 -5
- package/components/Image/classes/index.d.ts +7 -0
- package/components/Image/{utils/classes → classes}/types.d.ts +0 -5
- package/components/Image/index.fa98eb78.js +203 -0
- package/components/Image/tests/utils.d.ts +1 -1
- package/components/Image/types.d.ts +3 -43
- package/components/LanguagePopover/{index.e54c5cc7.js → index.2740fb8e.js} +3 -4
- package/components/LoadingError/{index.123e16f8.js → index.4f4724c4.js} +2 -2
- package/components/MFLoader/{index.52096ea5.js → index.f6a46c70.js} +1 -1
- package/components/ModalDialog/{index.2e931b5f.js → index.86de725b.js} +3 -3
- package/components/NoItemSelected/{index.1024b856.js → index.aa3679f1.js} +2 -3
- package/components/ObjectLogs/{index.d10f4a2f.js → index.0e365006.js} +7 -8
- package/components/PDFViewer/{index.98852f91.js → index.85d4e010.js} +1 -1
- package/components/Page/{index.def863f2.js → index.aa33f20b.js} +1 -1
- package/components/PaperForm/{index.8a617a66.js → index.b6811634.js} +2 -3
- package/components/Period/classes/index.d.ts +3 -1
- package/components/Period/classes/types.d.ts +6 -1
- package/components/Period/{index.d80dff10.js → index.ba79014c.js} +76 -61
- package/components/Period/subcomponents/SkeletonPeriod/index.d.ts +2 -0
- package/components/Period/subcomponents/SkeletonPeriod/types.d.ts +4 -0
- package/components/Period/types.d.ts +4 -1
- package/components/PrintingSystem/{index.2e17cae5.js → index.b3ed9375.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.c5ffe20a.js → index.7a5c7bdd.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.020c037c.js → index.85914c4b.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.78b023bb.js → index.45284722.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.b29fc1e9.js → index.a83e65dc.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.11626284.js → index.cb7d0af9.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.ef44c8ab.js → index.d67484e5.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.d72d224b.js → index.ab17815a.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.8e53440c.js → index.8a2617ae.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.0b66458e.js → index.2c52ee12.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.b4c72fef.js → index.f0ac0243.js} +1 -1
- package/components/PropertyValue/{index.3b6670d4.js → index.a3527d10.js} +2 -3
- package/components/Resizeable/{index.0eb66c37.js → index.8db8f77d.js} +1 -1
- package/components/ScrollBar/{index.010f1b9d.js → index.7dfc2f29.js} +4 -3
- package/components/ScrollBar/index.d.ts +2 -2
- package/components/SideBar/classes/index.d.ts +7 -2
- package/components/SideBar/classes/types.d.ts +6 -1
- package/components/SideBar/constants.d.ts +2 -0
- package/components/SideBar/context/sideBarContext/types.d.ts +3 -1
- package/components/SideBar/{index.cdb70977.js → index.0d49daff.js} +255 -427
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/ContentComponent/index.d.ts +1 -0
- package/components/SideBar/types.d.ts +1 -4
- package/components/SplitLayout/{index.30fd5861.js → index.3856385c.js} +1 -2
- package/components/ToastContainer/{index.97fdba82.js → index.b42aca02.js} +2 -2
- package/components/areas/components/AreasAdmin/{index.e4f0ccc1.js → index.6d902d47.js} +17 -18
- package/components/areas/components/AreasViewer/{index.f87c63ca.js → index.2a286dfa.js} +120 -221
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowHeaderSkeleton/index.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowHeaderSkeleton/types.d.ts +3 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +2 -2
- package/components/areas/contexts/AreasContext/{index.3e3d8c62.js → index.3eb6b2a4.js} +5 -5
- package/components/areas/hooks/useAreas/{index.b18fe111.js → index.febe901b.js} +1 -1
- package/components/commercial/TopBar/{index.8e2163f7.js → index.08853566.js} +5 -18
- package/components/formatters/BooleanFormatter/{index.b3052107.js → index.4bb3d2f9.js} +2 -2
- package/components/formatters/PointsFormatter/{index.5c94c5e8.js → index.8a4fa393.js} +4 -4
- package/components/formatters/{index.95cc337e.js → index.3e9e2305.js} +1 -1
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/{index.cf399b24.js → index.f9be5465.js} +41 -23
- package/components/hook-form/RHFAutocomplete/types.d.ts +7 -7
- package/components/hook-form/RHFAutocompleteAsync/{index.b2b75475.js → index.c01fd38a.js} +2 -3
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/{index.a38715e3.js → index.4f650b78.js} +37 -10
- package/components/hook-form/RHFCheckbox/types.d.ts +4 -1
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +8 -0
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/classes/types.d.ts +4 -0
- package/components/hook-form/RHFColorPicker/dictionary.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/index.5be9e237.js +206 -0
- package/components/hook-form/RHFColorPicker/index.d.ts +2 -8
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +3 -0
- package/components/hook-form/RHFColorPicker/types.d.ts +13 -2
- package/components/hook-form/RHFDateTime/classes/types.d.ts +3 -0
- package/components/hook-form/RHFDateTime/{index.5a673a96.js → index.ace3f52e.js} +52 -47
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/types.d.ts +3 -2
- package/components/hook-form/RHFDateTime/types.d.ts +4 -2
- package/components/hook-form/RHFPeriod/classes/index.d.ts +2 -1
- package/components/hook-form/RHFPeriod/classes/types.d.ts +2 -0
- package/components/hook-form/RHFPeriod/index.88812636.js +112 -0
- package/components/hook-form/RHFPeriod/types.d.ts +7 -1
- package/components/hook-form/RHFTextField/classes/types.d.ts +1 -0
- package/components/hook-form/RHFTextField/{index.fbb29ee1.js → index.d4192912.js} +40 -25
- package/components/hook-form/RHFTextField/types.d.ts +4 -3
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +0 -1
- package/components/hook-form/RHFUpload/{index.05d7e2a7.js → index.f7efd0e2.js} +4 -5
- package/components/hook-form/index.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/modal/{WindowBase.998b8a38.js → WindowBase.4881da1f.js} +3 -3
- package/components/modal/{WindowConfirm.55ac3c8f.js → WindowConfirm.3b0e842b.js} +6 -6
- package/components/mui_extended/Accordion/{index.fb4eb664.js → index.a32a5761.js} +2 -2
- package/components/mui_extended/Button/{index.e520bd15.js → index.81367a73.js} +3 -7
- package/components/mui_extended/CheckBox/types.d.ts +2 -1
- package/components/mui_extended/{CheckBox.e662d20c.js → CheckBox.b3c0f2ad.js} +21 -23
- package/components/mui_extended/IconButton/classes/types.d.ts +0 -1
- package/components/mui_extended/IconButton/{index.9ea23f87.js → index.32fc9419.js} +2 -5
- package/components/mui_extended/IconButton/types.d.ts +1 -1
- package/components/mui_extended/ImageButton/ImageButton.d.ts +1 -1
- package/components/mui_extended/MenuActions/{index.fa7c26a5.js → index.fdea20e7.js} +4 -5
- package/components/mui_extended/Pager/{index.0c703574.js → index.c843dde3.js} +2 -3
- package/components/mui_extended/Popover/{index.b3eca6b1.js → index.d85de73b.js} +1 -2
- package/components/mui_extended/Tab/{index.409b9c74.js → index.2068925d.js} +2 -3
- package/components/mui_extended/ToggleButton/{index.bcaea74b.js → index.3d71f374.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.131772d7.js → index.1cff26af.js} +1 -1
- package/contexts/ModalContext/{index.978a412d.js → index.e748f329.js} +1 -1
- package/contexts/RHFormContext/{index.7769076a.js → index.7b2a8723.js} +1 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/useFormAddEdit/{index.4caddd24.js → index.5c3d8e48.js} +2 -2
- package/hooks/useFormFocus/index.d.ts +7 -0
- package/hooks/useFormFocus/types.d.ts +8 -0
- package/hooks/useModal/{index.786a4439.js → index.66a0c82e.js} +1 -1
- package/hooks/useTab/{index.eee18a49.js → index.c0564138.js} +1 -1
- package/index.js +124 -120
- package/{node_modules.71622512.js → node_modules.47f7709b.js} +1 -1
- package/package.json +1 -1
- package/{vendor.a735310a.js → vendor.47f1f3d4.js} +90 -70
- package/components/Image/index.d034ca68.js +0 -388
- package/components/Image/subcomponents/BasicIntersectComponent/index.d.ts +0 -3
- package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +0 -7
- package/components/Image/subcomponents/Skeleton/index.d.ts +0 -2
- package/components/Image/subcomponents/Skeleton/types.d.ts +0 -6
- package/components/Image/utils/classes/index.d.ts +0 -12
- package/components/Image/utils/isIntersectionObserverAvailable.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/types.d.ts +0 -3
- package/components/SideBar/subcomponents/ContentGroups/type.d.ts +0 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/skeleton.d.ts +0 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +0 -2
- package/components/hook-form/RHFColorPicker/index.48a1ee1b.js +0 -153
- package/components/hook-form/RHFPeriod/index.4205c8ab.js +0 -76
- package/components/mui_extended/Popover/index.d.ts +0 -2
- /package/components/Image/{utils/classes → classes}/constant.d.ts +0 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { useFormContext, useWatch, Controller } from "react-hook-form";
|
|
3
|
+
import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { S as SketchPicker } from "../../../node_modules.47f7709b.js";
|
|
5
|
+
import "lodash-es/debounce";
|
|
6
|
+
import "lodash-es/each";
|
|
7
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
|
+
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
9
|
+
import { generateUtilityClasses, generateUtilityClass, styled, Skeleton } from "@mui/material";
|
|
10
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
11
|
+
import { useTheme } from "@mui/material/styles";
|
|
12
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
13
|
+
import { u as useFormFocus } from "../../../vendor.47f1f3d4.js";
|
|
14
|
+
import { F as FieldLabel } from "../../FieldLabel/index.8d3d6bb4.js";
|
|
15
|
+
import { P as Popover } from "../../mui_extended/Popover/index.d85de73b.js";
|
|
16
|
+
import { I as Icon } from "../../Icon/index.58eaf354.js";
|
|
17
|
+
import { B as Button } from "../../mui_extended/Button/index.81367a73.js";
|
|
18
|
+
const componentName = "M4LRHFColorPicker";
|
|
19
|
+
const colorPickerClasses = generateUtilityClasses(componentName, [
|
|
20
|
+
"root",
|
|
21
|
+
"popoverRoot",
|
|
22
|
+
"containerFieldColor",
|
|
23
|
+
"fieldColor",
|
|
24
|
+
"containerPicker",
|
|
25
|
+
"skeleton",
|
|
26
|
+
"sizeSmall",
|
|
27
|
+
"sizeMedium",
|
|
28
|
+
"isFocus",
|
|
29
|
+
"isTabSelected"
|
|
30
|
+
]);
|
|
31
|
+
function getRHFColorPickerUtilityClass(slot) {
|
|
32
|
+
return generateUtilityClass(componentName, slot);
|
|
33
|
+
}
|
|
34
|
+
const useUtilityClasses = (owmerState) => {
|
|
35
|
+
const slots = {
|
|
36
|
+
root: ["root", owmerState.isFocus && "isFocus", owmerState.isTabSelected && "isTabSelected", owmerState.size === "small" && "sizeSmall", owmerState.size === "medium" && "sizeMedium"],
|
|
37
|
+
popoverRoot: ["popoverRoot"],
|
|
38
|
+
containerFieldColor: ["containerFieldColor"],
|
|
39
|
+
fieldColor: ["boxColor"],
|
|
40
|
+
containerPicker: ["containerPicker"],
|
|
41
|
+
skeleton: ["skeleton"]
|
|
42
|
+
};
|
|
43
|
+
const composedClasses = unstable_composeClasses(slots, getRHFColorPickerUtilityClass, {});
|
|
44
|
+
return {
|
|
45
|
+
...composedClasses
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const RHFColorPickerRoot = styled("div")(({ theme }) => ({
|
|
49
|
+
...theme.components?.M4LRHFColorPicker?.styleOverrides
|
|
50
|
+
}));
|
|
51
|
+
const RHFColorPickerSkeleton = (props) => {
|
|
52
|
+
const {
|
|
53
|
+
label
|
|
54
|
+
} = props;
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: colorPickerClasses.skeleton,
|
|
57
|
+
children: [label && /* @__PURE__ */ jsx(Skeleton, {
|
|
58
|
+
variant: "text",
|
|
59
|
+
width: "30%",
|
|
60
|
+
height: "14px"
|
|
61
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
62
|
+
className: colorPickerClasses.skeleton,
|
|
63
|
+
variant: "rectangular",
|
|
64
|
+
width: 20,
|
|
65
|
+
height: 20
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const RHFColorPicker = (props) => {
|
|
70
|
+
const {
|
|
71
|
+
name,
|
|
72
|
+
size = "small",
|
|
73
|
+
label,
|
|
74
|
+
mandatory,
|
|
75
|
+
mandatoryMessage,
|
|
76
|
+
helperMessage
|
|
77
|
+
} = props;
|
|
78
|
+
const {
|
|
79
|
+
control,
|
|
80
|
+
setValue,
|
|
81
|
+
trigger
|
|
82
|
+
} = useFormContext();
|
|
83
|
+
const isSkeleton = useModuleSkeleton();
|
|
84
|
+
const {
|
|
85
|
+
host_static_assets,
|
|
86
|
+
environment_assets
|
|
87
|
+
} = useEnvironment();
|
|
88
|
+
const {
|
|
89
|
+
isFocus,
|
|
90
|
+
isTabSelected,
|
|
91
|
+
handlerFocus,
|
|
92
|
+
handlerOnKeyUp,
|
|
93
|
+
handlerOnBlur
|
|
94
|
+
} = useFormFocus();
|
|
95
|
+
const theme = useTheme();
|
|
96
|
+
const currentColor = useWatch({
|
|
97
|
+
name,
|
|
98
|
+
control
|
|
99
|
+
});
|
|
100
|
+
const isDesktop = useResponsiveDesktop();
|
|
101
|
+
const [tempColor, setTempColor] = useState(() => currentColor || "#ffffff");
|
|
102
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
103
|
+
const {
|
|
104
|
+
getLabel
|
|
105
|
+
} = useModuleDictionary();
|
|
106
|
+
const handleColorChange = (color) => {
|
|
107
|
+
console.log("react color pick", color.hex);
|
|
108
|
+
setTempColor(color.hex);
|
|
109
|
+
};
|
|
110
|
+
const handleApprove = () => {
|
|
111
|
+
setAnchorEl(null);
|
|
112
|
+
if (tempColor !== currentColor) {
|
|
113
|
+
setValue(name, tempColor);
|
|
114
|
+
trigger(name);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const ownerState = {
|
|
118
|
+
isFocus: !isSkeleton ? isFocus : false,
|
|
119
|
+
isTabSelected: !isSkeleton ? isTabSelected : false,
|
|
120
|
+
size: isDesktop ? size : "medium"
|
|
121
|
+
};
|
|
122
|
+
const classes = useUtilityClasses(ownerState);
|
|
123
|
+
console.log("isFocus", isFocus);
|
|
124
|
+
console.log("isTabSelected", isTabSelected);
|
|
125
|
+
return /* @__PURE__ */ jsx(RHFColorPickerRoot, {
|
|
126
|
+
className: classes.root,
|
|
127
|
+
tabIndex: 0,
|
|
128
|
+
onFocus: handlerFocus,
|
|
129
|
+
onBlur: handlerOnBlur,
|
|
130
|
+
onKeyUp: handlerOnKeyUp,
|
|
131
|
+
children: !isSkeleton ? /* @__PURE__ */ jsx(Controller, {
|
|
132
|
+
name,
|
|
133
|
+
control,
|
|
134
|
+
defaultValue: "",
|
|
135
|
+
render: ({
|
|
136
|
+
field: {
|
|
137
|
+
value
|
|
138
|
+
},
|
|
139
|
+
fieldState: {
|
|
140
|
+
error
|
|
141
|
+
}
|
|
142
|
+
}) => /* @__PURE__ */ jsxs(Fragment, {
|
|
143
|
+
children: [label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
144
|
+
label,
|
|
145
|
+
mandatory,
|
|
146
|
+
mandatoryMessage,
|
|
147
|
+
helperMessage
|
|
148
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
149
|
+
className: classes.containerFieldColor,
|
|
150
|
+
onClick: (event) => setAnchorEl(event.currentTarget),
|
|
151
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
152
|
+
className: classes.fieldColor,
|
|
153
|
+
style: {
|
|
154
|
+
backgroundColor: value
|
|
155
|
+
}
|
|
156
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
157
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/rhfcolorpicker/assets/icons/chevron_right.svg`
|
|
158
|
+
})]
|
|
159
|
+
}), error?.message && /* @__PURE__ */ jsx(HelperText, {
|
|
160
|
+
variant: "error",
|
|
161
|
+
message: error?.message + ""
|
|
162
|
+
}), /* @__PURE__ */ jsx(Popover, {
|
|
163
|
+
open: Boolean(anchorEl),
|
|
164
|
+
arrowType: "top-center",
|
|
165
|
+
className: classes.popoverRoot,
|
|
166
|
+
anchorEl,
|
|
167
|
+
onClose: () => setAnchorEl(null),
|
|
168
|
+
anchorOrigin: {
|
|
169
|
+
vertical: "bottom",
|
|
170
|
+
horizontal: "center"
|
|
171
|
+
},
|
|
172
|
+
transformOrigin: {
|
|
173
|
+
vertical: "top",
|
|
174
|
+
horizontal: "center"
|
|
175
|
+
},
|
|
176
|
+
sx: {
|
|
177
|
+
mt: "12px",
|
|
178
|
+
ml: -1.25,
|
|
179
|
+
...theme.components?.M4LRHFColorPickerPopoverRoot?.styleOverrides
|
|
180
|
+
},
|
|
181
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
182
|
+
className: classes.containerPicker,
|
|
183
|
+
children: [/* @__PURE__ */ jsx(SketchPicker, {
|
|
184
|
+
color: tempColor,
|
|
185
|
+
onChange: handleColorChange,
|
|
186
|
+
disableAlpha: true
|
|
187
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
188
|
+
variant: "contained",
|
|
189
|
+
onClick: handleApprove,
|
|
190
|
+
children: getLabel("rhfcolorpicker.accept")
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
})]
|
|
194
|
+
})
|
|
195
|
+
}) : /* @__PURE__ */ jsx(RHFColorPickerSkeleton, {
|
|
196
|
+
label
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
function getRHFColorPickerComponentsDictionary() {
|
|
201
|
+
return ["rhfcolorpicker"];
|
|
202
|
+
}
|
|
203
|
+
export {
|
|
204
|
+
RHFColorPicker as R,
|
|
205
|
+
getRHFColorPickerComponentsDictionary as g
|
|
206
|
+
};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Componente RHFColorPicker para seleccionar colores con React Hook Form.
|
|
4
|
-
* @component
|
|
5
|
-
* @param {RHFColorPickerProps} props - Propiedades del componente.
|
|
6
|
-
* @returns {JSX.Element} - Elemento JSX que representa el componente.
|
|
7
|
-
*/
|
|
8
|
-
export declare const RHFColorPicker: (props: RHFColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export { RHFColorPicker } from './RFHColorPicker';
|
|
2
|
+
export { getRHFColorPickerComponentsDictionary } from './dictionary';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { RHFColorPickerSkeletoProps } from './types';
|
|
2
|
+
export declare const RHFColorPickerSkeleton: (props: RHFColorPickerSkeletoProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { FieldLabelProps } from "../../FieldLabel/types";
|
|
2
|
+
export interface RHFColorPickerProps extends Omit<FieldLabelProps, 'label'> {
|
|
3
|
+
/**
|
|
4
|
+
* Nombre de etiqueta del campo
|
|
5
|
+
*/
|
|
6
|
+
label?: string;
|
|
2
7
|
/**
|
|
3
8
|
* Identificador del campo dentro del formulario de react hook form
|
|
4
9
|
*/
|
|
5
10
|
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Variaciones de tamaño para el componente
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium';
|
|
6
15
|
}
|
|
7
|
-
export interface OwnerState {
|
|
16
|
+
export interface OwnerState extends Pick<RHFColorPickerProps, 'size'> {
|
|
17
|
+
isFocus: boolean;
|
|
18
|
+
isTabSelected: boolean;
|
|
8
19
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { useUtilityClasses } from ".";
|
|
1
2
|
export interface RHFDateTimeClassesType {
|
|
2
3
|
root: string;
|
|
3
4
|
skeleton: string;
|
|
4
5
|
small: string;
|
|
5
6
|
medium: string;
|
|
6
7
|
isFocus: string;
|
|
8
|
+
isTabSelected: string;
|
|
7
9
|
isDisabled: string;
|
|
8
10
|
variantInfo: string;
|
|
9
11
|
variantSuccess: string;
|
|
@@ -11,3 +13,4 @@ export interface RHFDateTimeClassesType {
|
|
|
11
13
|
variantError: string;
|
|
12
14
|
}
|
|
13
15
|
export declare type RHFDateTimeClassesKey = keyof RHFDateTimeClassesType;
|
|
16
|
+
export declare type RHFDateTimeClasses = ReturnType<typeof useUtilityClasses>;
|
|
@@ -1,45 +1,38 @@
|
|
|
1
1
|
import { useFormContext, Controller } from "react-hook-form";
|
|
2
2
|
import { DateTimePicker } from "@mui/x-date-pickers";
|
|
3
3
|
import { useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
4
|
-
import { Skeleton, generateUtilityClasses, generateUtilityClass, styled
|
|
5
|
-
import {
|
|
6
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
4
|
+
import { Skeleton, generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
|
|
5
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
7
6
|
import { useFormatter, useResponsiveDesktop } from "@m4l/graphics";
|
|
8
7
|
import { useState, useEffect } from "react";
|
|
9
8
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
9
|
import clsx from "clsx";
|
|
11
10
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
12
11
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
theme
|
|
17
|
-
}) => ({
|
|
18
|
-
display: "flex",
|
|
19
|
-
width: "100%",
|
|
20
|
-
height: "42.25px",
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
justifyContent: "space-between",
|
|
23
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
24
|
-
padding: "0 14px",
|
|
25
|
-
borderRadius: theme.spacing(0.5)
|
|
26
|
-
}));
|
|
12
|
+
import { u as useFormFocus } from "../../../vendor.47f1f3d4.js";
|
|
13
|
+
import { F as FieldLabel } from "../../FieldLabel/index.8d3d6bb4.js";
|
|
14
|
+
import { I as Icon } from "../../Icon/index.58eaf354.js";
|
|
27
15
|
const SkeletonRHFDateTime = (props) => {
|
|
28
16
|
const {
|
|
29
17
|
skeletonWidth,
|
|
30
18
|
skeletonHeight,
|
|
31
|
-
className
|
|
32
|
-
} = props;
|
|
33
|
-
return /* @__PURE__ */ jsxs(SKTRHFWrapperTextField, {
|
|
34
19
|
className,
|
|
35
|
-
|
|
20
|
+
label
|
|
21
|
+
} = props;
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
23
|
+
children: [label && /* @__PURE__ */ jsx(Skeleton, {
|
|
36
24
|
variant: "text",
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}), /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
height: "14px",
|
|
26
|
+
width: "30%"
|
|
27
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: className.skeleton,
|
|
29
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
30
|
+
variant: "text",
|
|
31
|
+
width: skeletonWidth,
|
|
32
|
+
height: skeletonHeight
|
|
33
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
34
|
+
variant: "circular"
|
|
35
|
+
})]
|
|
43
36
|
})]
|
|
44
37
|
});
|
|
45
38
|
};
|
|
@@ -50,6 +43,7 @@ generateUtilityClasses(componentName, [
|
|
|
50
43
|
"small",
|
|
51
44
|
"medium",
|
|
52
45
|
"isFocus",
|
|
46
|
+
"isTabSelected",
|
|
53
47
|
"isDisabled",
|
|
54
48
|
"variantInfo",
|
|
55
49
|
"variantSuccess",
|
|
@@ -61,7 +55,7 @@ function getRHFCheckboxUtilityClass(slot) {
|
|
|
61
55
|
}
|
|
62
56
|
const useUtilityClasses = (ownerState) => {
|
|
63
57
|
const slots = {
|
|
64
|
-
root: ["root", ownerState.size === "small" && "small", ownerState.size === "medium" && "medium", ownerState.isFocus && "isFocus", ownerState.disabled && "isDisabled", ownerState.variant === "info" && "variantInfo", ownerState.variant === "success" && "variantSuccess", ownerState.variant === "warning" && "variantWarning", ownerState.variant === "error" && "variantError"],
|
|
58
|
+
root: ["root", ownerState.size === "small" && "small", ownerState.size === "medium" && "medium", ownerState.isFocus && "isFocus", ownerState.isTabSelected && "isTabSelected", ownerState.disabled && "isDisabled", ownerState.variant === "info" && "variantInfo", ownerState.variant === "success" && "variantSuccess", ownerState.variant === "warning" && "variantWarning", ownerState.variant === "error" && "variantError"],
|
|
65
59
|
skeleton: ["skeleton"]
|
|
66
60
|
};
|
|
67
61
|
const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
|
|
@@ -69,7 +63,7 @@ const useUtilityClasses = (ownerState) => {
|
|
|
69
63
|
...composedClasses
|
|
70
64
|
};
|
|
71
65
|
};
|
|
72
|
-
const RHFDateTimeRoot = styled
|
|
66
|
+
const RHFDateTimeRoot = styled("div")(({ theme }) => ({
|
|
73
67
|
...theme.components?.M4LRHFDateTime?.styleOverrides
|
|
74
68
|
}));
|
|
75
69
|
const RHFDATETIME_PREFIX = "RHFDateTime";
|
|
@@ -86,7 +80,9 @@ function RHFDateTime(props) {
|
|
|
86
80
|
skeletonHeight = 14,
|
|
87
81
|
className,
|
|
88
82
|
label,
|
|
89
|
-
helperMessage
|
|
83
|
+
helperMessage,
|
|
84
|
+
mandatory,
|
|
85
|
+
mandatoryMessage
|
|
90
86
|
} = props;
|
|
91
87
|
const {
|
|
92
88
|
host_static_assets,
|
|
@@ -97,8 +93,14 @@ function RHFDateTime(props) {
|
|
|
97
93
|
src: `${host_static_assets}/${environment_assets}/frontend/components/rhfdate/ended_at.svg`
|
|
98
94
|
});
|
|
99
95
|
};
|
|
100
|
-
const [isFocus, setIsFocus] = useState(false);
|
|
101
96
|
const [currentVariant, setCurrentVariant] = useState(void 0);
|
|
97
|
+
const {
|
|
98
|
+
isFocus,
|
|
99
|
+
isTabSelected,
|
|
100
|
+
handlerFocus,
|
|
101
|
+
handlerOnKeyUp,
|
|
102
|
+
handlerOnBlur
|
|
103
|
+
} = useFormFocus();
|
|
102
104
|
const {
|
|
103
105
|
control,
|
|
104
106
|
formState: {
|
|
@@ -120,15 +122,10 @@ function RHFDateTime(props) {
|
|
|
120
122
|
datetimeFormat
|
|
121
123
|
}
|
|
122
124
|
} = useFormatter();
|
|
123
|
-
const handlerFocus = () => {
|
|
124
|
-
setIsFocus(true);
|
|
125
|
-
};
|
|
126
|
-
const handlerBlur = () => {
|
|
127
|
-
setIsFocus(false);
|
|
128
|
-
};
|
|
129
125
|
const isDesktop = useResponsiveDesktop();
|
|
130
126
|
const ownerState = {
|
|
131
|
-
isFocus,
|
|
127
|
+
isFocus: !isSkeleton ? isFocus : false,
|
|
128
|
+
isTabSelected: !isSkeleton ? isTabSelected : false,
|
|
132
129
|
disabled,
|
|
133
130
|
size: isDesktop ? size : "medium",
|
|
134
131
|
variant: currentVariant
|
|
@@ -136,6 +133,10 @@ function RHFDateTime(props) {
|
|
|
136
133
|
const classes = useUtilityClasses(ownerState);
|
|
137
134
|
return /* @__PURE__ */ jsx(RHFDateTimeRoot, {
|
|
138
135
|
className: clsx(classes.root, className),
|
|
136
|
+
tabIndex: 0,
|
|
137
|
+
onFocus: handlerFocus,
|
|
138
|
+
onBlur: handlerOnBlur,
|
|
139
|
+
onKeyUp: handlerOnKeyUp,
|
|
139
140
|
...process.env.NODE_ENV !== "production" ? {
|
|
140
141
|
[TEST_PROP_ID]: getNameRHFDateTimeDataTestId("root")
|
|
141
142
|
} : {},
|
|
@@ -152,10 +153,13 @@ function RHFDateTime(props) {
|
|
|
152
153
|
error
|
|
153
154
|
}
|
|
154
155
|
}) => {
|
|
156
|
+
console.log("RHFDateTime value", typeof value);
|
|
155
157
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
156
|
-
children: [label && /* @__PURE__ */ jsx(
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
children: [label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
159
|
+
label,
|
|
160
|
+
mandatory,
|
|
161
|
+
mandatoryMessage,
|
|
162
|
+
helperMessage
|
|
159
163
|
}), /* @__PURE__ */ jsx(DateTimePicker, {
|
|
160
164
|
sx: {
|
|
161
165
|
"& .MuiTouchRipple-root": {
|
|
@@ -174,22 +178,23 @@ function RHFDateTime(props) {
|
|
|
174
178
|
slotProps: {
|
|
175
179
|
textField: {
|
|
176
180
|
onFocus: handlerFocus,
|
|
177
|
-
onBlur:
|
|
181
|
+
onBlur: handlerOnBlur
|
|
178
182
|
},
|
|
179
183
|
field: {
|
|
180
184
|
format: datetimeFormat
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
|
-
}),
|
|
184
|
-
variant:
|
|
185
|
-
message:
|
|
186
|
-
})
|
|
187
|
+
}), error?.message && /* @__PURE__ */ jsx(HelperText, {
|
|
188
|
+
variant: "error",
|
|
189
|
+
message: error?.message + ""
|
|
190
|
+
})]
|
|
187
191
|
});
|
|
188
192
|
}
|
|
189
193
|
}) : /* @__PURE__ */ jsx(SkeletonRHFDateTime, {
|
|
190
194
|
skeletonWidth,
|
|
191
195
|
skeletonHeight,
|
|
192
|
-
className: classes
|
|
196
|
+
className: classes,
|
|
197
|
+
label
|
|
193
198
|
})
|
|
194
199
|
});
|
|
195
200
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RHFDateTimeProps } from '../../types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { RHFDateTimeClasses } from '../../classes/types';
|
|
3
|
+
export interface SkeletonRHFDateTimeProps extends Pick<RHFDateTimeProps, 'skeletonWidth' | 'skeletonHeight' | 'label'> {
|
|
4
|
+
className: RHFDateTimeClasses;
|
|
4
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { FieldLabelProps } from "../../FieldLabel/types";
|
|
2
|
+
export interface RHFDateTimeProps extends Omit<FieldLabelProps, 'label'> {
|
|
2
3
|
skeletonWidth?: string | number;
|
|
3
4
|
skeletonHeight?: string | number;
|
|
4
5
|
name: string;
|
|
@@ -12,7 +13,8 @@ export interface RHFDateTimeProps {
|
|
|
12
13
|
declare type SizeType = 'small' | 'medium';
|
|
13
14
|
export declare type RHFDateTimeVariants = 'info' | 'success' | 'warning' | undefined;
|
|
14
15
|
export interface OwnerState extends Pick<RHFDateTimeProps, 'size' | 'disabled'> {
|
|
15
|
-
isFocus
|
|
16
|
+
isFocus: boolean;
|
|
17
|
+
isTabSelected: boolean;
|
|
16
18
|
variant?: RHFDateTimeVariants | 'error';
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RHFPeriodClassesType } from './types';
|
|
2
|
+
import { OwnerState } from '../types';
|
|
2
3
|
export declare const RHFPeriodClasses: RHFPeriodClassesType;
|
|
3
4
|
export declare function getRHFPeriodUtilityClass(slot: string): string;
|
|
4
|
-
export declare const RHFPeriodUtilityClasses: () => {
|
|
5
|
+
export declare const RHFPeriodUtilityClasses: (ownerState: OwnerState) => {
|
|
5
6
|
root: string;
|
|
6
7
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RHFPeriodUtilityClasses } from ".";
|
|
2
2
|
export interface RHFPeriodClassesType {
|
|
3
3
|
root: string;
|
|
4
|
+
isFocus: string;
|
|
5
|
+
isTabSelected: string;
|
|
4
6
|
}
|
|
5
7
|
export declare type RHFPeriodClassesKey = keyof RHFPeriodClassesType;
|
|
6
8
|
export declare type Classes = ReturnType<typeof RHFPeriodUtilityClasses>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
+
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
+
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
6
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
|
+
import { u as useFormFocus } from "../../../vendor.47f1f3d4.js";
|
|
8
|
+
import { F as FieldLabel } from "../../FieldLabel/index.8d3d6bb4.js";
|
|
9
|
+
import { P as Period } from "../../Period/index.ba79014c.js";
|
|
10
|
+
const RHFPeriodRoot = styled("div")(({
|
|
11
|
+
theme
|
|
12
|
+
}) => ({
|
|
13
|
+
width: "100%",
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
alignItems: "flex-start",
|
|
18
|
+
gap: theme.spacing(1),
|
|
19
|
+
...theme.components?.M4LRHFPeriod?.styleOverrides
|
|
20
|
+
}));
|
|
21
|
+
const componentName = "M4LRHFPeriod";
|
|
22
|
+
generateUtilityClasses(componentName, [
|
|
23
|
+
"root",
|
|
24
|
+
"isFocus",
|
|
25
|
+
"isTabSelected"
|
|
26
|
+
]);
|
|
27
|
+
function getRHFPeriodUtilityClass(slot) {
|
|
28
|
+
return generateUtilityClass(componentName, slot);
|
|
29
|
+
}
|
|
30
|
+
const RHFPeriodUtilityClasses = (ownerState) => {
|
|
31
|
+
const slots = {
|
|
32
|
+
root: ["root", ownerState.isFocus && "isFocus", ownerState.isTabSelected && "isTabSelected"]
|
|
33
|
+
};
|
|
34
|
+
const composedClasses = unstable_composeClasses(slots, getRHFPeriodUtilityClass, {});
|
|
35
|
+
return {
|
|
36
|
+
...composedClasses
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const RHFPeriod = (props) => {
|
|
40
|
+
const {
|
|
41
|
+
name,
|
|
42
|
+
readOnly,
|
|
43
|
+
skeletonWidth,
|
|
44
|
+
skeletonHeight,
|
|
45
|
+
state,
|
|
46
|
+
label,
|
|
47
|
+
mandatory,
|
|
48
|
+
mandatoryMessage,
|
|
49
|
+
helperMessage,
|
|
50
|
+
size
|
|
51
|
+
} = props;
|
|
52
|
+
const {
|
|
53
|
+
control
|
|
54
|
+
} = useFormContext();
|
|
55
|
+
const isSkeleton = useModuleSkeleton();
|
|
56
|
+
const {
|
|
57
|
+
isFocus,
|
|
58
|
+
isTabSelected,
|
|
59
|
+
handlerFocus,
|
|
60
|
+
handlerOnKeyUp,
|
|
61
|
+
handlerOnBlur
|
|
62
|
+
} = useFormFocus();
|
|
63
|
+
const ownerState = {
|
|
64
|
+
isFocus: !isSkeleton ? isFocus : false,
|
|
65
|
+
isTabSelected: !isSkeleton ? isTabSelected : false
|
|
66
|
+
};
|
|
67
|
+
const classes = RHFPeriodUtilityClasses(ownerState);
|
|
68
|
+
return /* @__PURE__ */ jsx(RHFPeriodRoot, {
|
|
69
|
+
className: classes.root,
|
|
70
|
+
tabIndex: 0,
|
|
71
|
+
onFocus: handlerFocus,
|
|
72
|
+
onBlur: handlerOnBlur,
|
|
73
|
+
onKeyUp: handlerOnKeyUp,
|
|
74
|
+
children: /* @__PURE__ */ jsx(Controller, {
|
|
75
|
+
name,
|
|
76
|
+
control,
|
|
77
|
+
render: ({
|
|
78
|
+
field: {
|
|
79
|
+
onChange,
|
|
80
|
+
value
|
|
81
|
+
},
|
|
82
|
+
fieldState: {
|
|
83
|
+
error
|
|
84
|
+
}
|
|
85
|
+
}) => {
|
|
86
|
+
console.log("value RHFPeriod", value);
|
|
87
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
88
|
+
children: [label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
89
|
+
label,
|
|
90
|
+
mandatory,
|
|
91
|
+
mandatoryMessage,
|
|
92
|
+
helperMessage
|
|
93
|
+
}), /* @__PURE__ */ jsx(Period, {
|
|
94
|
+
value,
|
|
95
|
+
onChange,
|
|
96
|
+
state: !!error === true ? "error" : state,
|
|
97
|
+
readOnly,
|
|
98
|
+
skeletonWidth,
|
|
99
|
+
skeletonHeight,
|
|
100
|
+
size
|
|
101
|
+
}), error && /* @__PURE__ */ jsx(HelperText, {
|
|
102
|
+
variant: "error",
|
|
103
|
+
message: error.message || ""
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
RHFPeriod as R
|
|
112
|
+
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { FieldLabelProps } from '../../FieldLabel/types';
|
|
1
2
|
import { PeriodProps, PeriodState, PeriodVariant } from '../../../components/Period/types';
|
|
2
|
-
export interface RHFPeriodProps extends Pick<PeriodProps, 'readOnly' | 'skeletonWidth' | 'skeletonHeight'> {
|
|
3
|
+
export interface RHFPeriodProps extends Pick<PeriodProps, 'readOnly' | 'skeletonWidth' | 'skeletonHeight' | 'size'>, Omit<FieldLabelProps, 'label'> {
|
|
3
4
|
name: string;
|
|
4
5
|
variant?: PeriodVariant;
|
|
5
6
|
state?: PeriodState;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OwnerState {
|
|
10
|
+
isFocus: boolean;
|
|
11
|
+
isTabSelected: boolean;
|
|
6
12
|
}
|