@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
|
|
3
3
|
import { forwardRef, useState, useEffect } from "react";
|
|
4
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index.
|
|
4
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.32fc9419.js";
|
|
5
5
|
import { useFormContext, Controller } from "react-hook-form";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
|
-
import { styled as styled$1 } from "@mui/material/styles";
|
|
9
8
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
9
|
import { g as getComponentUtilityClass } from "../../../utils/index.de903261.js";
|
|
11
|
-
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
12
10
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
13
11
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
12
|
+
import { u as useFormFocus } from "../../../vendor.47f1f3d4.js";
|
|
13
|
+
import { F as FieldLabel } from "../../FieldLabel/index.8d3d6bb4.js";
|
|
14
14
|
const SkeletonTextFieldRoot = styled("div")(() => ({
|
|
15
15
|
display: "flex",
|
|
16
16
|
flexDirection: "column",
|
|
@@ -74,12 +74,12 @@ const SkeletonTextField = (props) => {
|
|
|
74
74
|
})]
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
const RHFTextFieldRoot = styled
|
|
77
|
+
const RHFTextFieldRoot = styled("div")(({
|
|
78
78
|
theme
|
|
79
79
|
}) => ({
|
|
80
80
|
...theme.components?.M4LRHFTextField?.styleOverrides
|
|
81
81
|
}));
|
|
82
|
-
styled
|
|
82
|
+
styled("div")(({
|
|
83
83
|
theme
|
|
84
84
|
}) => ({
|
|
85
85
|
display: "flex",
|
|
@@ -105,7 +105,8 @@ generateUtilityClasses(
|
|
|
105
105
|
"variantError",
|
|
106
106
|
"sizeSmall",
|
|
107
107
|
"sizeMedium",
|
|
108
|
-
"isFocus"
|
|
108
|
+
"isFocus",
|
|
109
|
+
"isTabSelected"
|
|
109
110
|
]
|
|
110
111
|
);
|
|
111
112
|
const getRHFTextFieldClassesByState = (ownerState) => {
|
|
@@ -115,7 +116,8 @@ const getRHFTextFieldClassesByState = (ownerState) => {
|
|
|
115
116
|
ownerState.type === "password" ? "variantPassword" : "variantText",
|
|
116
117
|
ownerState.size === "small" && "sizeSmall",
|
|
117
118
|
ownerState.size === "medium" && "sizeMedium",
|
|
118
|
-
ownerState.
|
|
119
|
+
ownerState.isFocus && "isFocus",
|
|
120
|
+
ownerState.isTabSelected && "isTabSelected",
|
|
119
121
|
ownerState.disabled && "isDisabled",
|
|
120
122
|
ownerState.variant === "info" && "variantInfo",
|
|
121
123
|
ownerState.variant === "success" && "variantSuccess",
|
|
@@ -144,6 +146,9 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
144
146
|
variant,
|
|
145
147
|
helperMessage = "",
|
|
146
148
|
disabled,
|
|
149
|
+
mandatory,
|
|
150
|
+
mandatoryMessage,
|
|
151
|
+
helperText,
|
|
147
152
|
...other
|
|
148
153
|
} = props;
|
|
149
154
|
const {
|
|
@@ -152,9 +157,16 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
152
157
|
errors
|
|
153
158
|
}
|
|
154
159
|
} = useFormContext();
|
|
155
|
-
const [isFocus, setIsFocus] = useState(false);
|
|
156
160
|
const [currentVariant, setCurrentVariant] = useState(null);
|
|
161
|
+
const {
|
|
162
|
+
isFocus,
|
|
163
|
+
isTabSelected,
|
|
164
|
+
handlerFocus,
|
|
165
|
+
handlerOnKeyUp,
|
|
166
|
+
handlerOnBlur
|
|
167
|
+
} = useFormFocus();
|
|
157
168
|
const isDesktop = useResponsiveDesktop();
|
|
169
|
+
const isSkeleton = useModuleSkeleton();
|
|
158
170
|
useEffect(() => {
|
|
159
171
|
if (errors[nameRHF]) {
|
|
160
172
|
setCurrentVariant("error");
|
|
@@ -164,23 +176,21 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
164
176
|
setCurrentVariant(null);
|
|
165
177
|
}
|
|
166
178
|
}, [errors[nameRHF], variant, control]);
|
|
167
|
-
const handleFocus = () => {
|
|
168
|
-
setIsFocus(true);
|
|
169
|
-
};
|
|
170
|
-
const handleBlur = () => {
|
|
171
|
-
setIsFocus(false);
|
|
172
|
-
};
|
|
173
179
|
const ownerState = {
|
|
174
180
|
type: type === "password" ? "password" : "text",
|
|
175
181
|
size: !isDesktop ? "medium" : size,
|
|
176
|
-
|
|
182
|
+
isFocus: !isSkeleton ? isFocus : false,
|
|
183
|
+
isTabSelected: !isSkeleton ? isTabSelected : false,
|
|
177
184
|
variant: currentVariant,
|
|
178
185
|
disabled
|
|
179
186
|
};
|
|
180
187
|
const classes = getRHFTextFieldClassesByState(ownerState);
|
|
181
|
-
const isSkeleton = useModuleSkeleton();
|
|
182
188
|
return /* @__PURE__ */ jsx(RHFTextFieldRoot, {
|
|
183
189
|
className: classes.root,
|
|
190
|
+
tabIndex: 0,
|
|
191
|
+
onFocus: handlerFocus,
|
|
192
|
+
onBlur: handlerOnBlur,
|
|
193
|
+
onKeyUp: handlerOnKeyUp,
|
|
184
194
|
role: "textbox",
|
|
185
195
|
...process.env.NODE_ENV !== "production" ? {
|
|
186
196
|
[TEST_PROP_ID]: `${RHFTEXTFIELD_ROOT_TEST_ID}_${nameRHF}`
|
|
@@ -209,11 +219,12 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
209
219
|
onChange(event);
|
|
210
220
|
};
|
|
211
221
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
212
|
-
children: [label
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
222
|
+
children: [label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
223
|
+
label,
|
|
224
|
+
mandatory,
|
|
225
|
+
mandatoryMessage,
|
|
226
|
+
helperMessage
|
|
227
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
217
228
|
variant: "outlined",
|
|
218
229
|
disabled,
|
|
219
230
|
ref,
|
|
@@ -223,8 +234,6 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
223
234
|
},
|
|
224
235
|
autoComplete,
|
|
225
236
|
onChange: onInternalChange,
|
|
226
|
-
onFocus: handleFocus,
|
|
227
|
-
onBlur: handleBlur,
|
|
228
237
|
value: type === "number" ? isNaN(value) ? 0 : value : value || "",
|
|
229
238
|
name,
|
|
230
239
|
inputProps: {
|
|
@@ -270,7 +279,7 @@ const RHFTextField = forwardRef((props, ref) => {
|
|
|
270
279
|
});
|
|
271
280
|
});
|
|
272
281
|
RHFTextField.displayName = "RHFTextField";
|
|
273
|
-
const RHFTextFieldPasswordRoot = styled
|
|
282
|
+
const RHFTextFieldPasswordRoot = styled("div")(({
|
|
274
283
|
theme
|
|
275
284
|
}) => ({
|
|
276
285
|
...theme.components?.M4LRHFTextFieldPassword?.styleOverrides
|
|
@@ -300,7 +309,10 @@ const RHFTextFieldPassword = (props) => {
|
|
|
300
309
|
label,
|
|
301
310
|
skeletonWidth,
|
|
302
311
|
skeletonHeight,
|
|
303
|
-
size
|
|
312
|
+
size,
|
|
313
|
+
mandatory,
|
|
314
|
+
mandatoryMessage,
|
|
315
|
+
helperMessage
|
|
304
316
|
} = props;
|
|
305
317
|
const [showPassword, setShowPassword] = useState(false);
|
|
306
318
|
const {
|
|
@@ -321,6 +333,9 @@ const RHFTextFieldPassword = (props) => {
|
|
|
321
333
|
skeletonWidth,
|
|
322
334
|
skeletonHeight,
|
|
323
335
|
size,
|
|
336
|
+
mandatory,
|
|
337
|
+
mandatoryMessage,
|
|
338
|
+
helperMessage,
|
|
324
339
|
InputProps: {
|
|
325
340
|
endAdornment: /* @__PURE__ */ jsx(InputAdornment, {
|
|
326
341
|
position: "end",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TextFieldProps } from '@mui/material';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
+
import { FieldLabelProps } from '../../FieldLabel/types';
|
|
3
4
|
export declare type RHFTextFieldVariants = 'info' | 'success' | 'warning';
|
|
4
|
-
export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'variant' | 'label'> {
|
|
5
|
+
export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputProps' | 'variant' | 'label'>, Omit<FieldLabelProps, 'label'> {
|
|
5
6
|
skeletonWidth?: string | number;
|
|
6
7
|
skeletonHeight?: string | number;
|
|
7
8
|
name: string;
|
|
@@ -9,11 +10,11 @@ export interface RHFTextFieldProps extends Omit<TextFieldProps, 'size' | 'inputP
|
|
|
9
10
|
startIcon?: ReactElement;
|
|
10
11
|
endIcon?: ReactElement;
|
|
11
12
|
variant?: RHFTextFieldVariants;
|
|
12
|
-
helperMessage?: string;
|
|
13
13
|
label?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface RHFTextFieldState extends Pick<RHFTextFieldProps, 'size' | 'disabled'> {
|
|
16
16
|
type: 'password' | 'text';
|
|
17
|
-
|
|
17
|
+
isFocus: boolean;
|
|
18
|
+
isTabSelected: boolean;
|
|
18
19
|
variant: RHFTextFieldVariants | 'error' | null;
|
|
19
20
|
}
|
|
@@ -2,15 +2,14 @@ import { useCallback } from "react";
|
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import require$$0 from "lodash/isString";
|
|
4
4
|
import { useDropzone } from "react-dropzone";
|
|
5
|
-
import { I as Image } from "../../Image/index.
|
|
5
|
+
import { I as Image } from "../../Image/index.fa98eb78.js";
|
|
6
6
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
7
|
-
import { styled } from "@mui/material
|
|
8
|
-
import { Skeleton, generateUtilityClasses, generateUtilityClass, styled as styled$1 } from "@mui/material";
|
|
7
|
+
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
9
8
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
10
9
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
11
10
|
import { unstable_composeClasses } from "@mui/base";
|
|
12
11
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
13
|
-
import { B as Button } from "../../mui_extended/Button/index.
|
|
12
|
+
import { B as Button } from "../../mui_extended/Button/index.81367a73.js";
|
|
14
13
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
15
14
|
const UploadImageRoot = styled("div")(({
|
|
16
15
|
theme
|
|
@@ -194,7 +193,7 @@ function UploadImage({
|
|
|
194
193
|
})
|
|
195
194
|
});
|
|
196
195
|
}
|
|
197
|
-
const WrapperRHFUploadImage = styled
|
|
196
|
+
const WrapperRHFUploadImage = styled("div")(() => ({
|
|
198
197
|
width: "inherit",
|
|
199
198
|
height: "inherit",
|
|
200
199
|
padding: "1px"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { RHFAutocomplete } from './RHFAutocomplete/RHFAutocomplete';
|
|
2
|
-
export
|
|
2
|
+
export * from './RHFColorPicker';
|
|
3
3
|
export { getRHFAutocompleteComponentsDictionary } from './RHFAutocomplete/dictionary';
|
|
4
4
|
export { RHFAutocompleteAsync } from './RHFAutocompleteAsync/RHFAutocompleteAsync';
|
|
5
5
|
export { getRHFAutocompleteAsyncComponentsDictionary } from './RHFAutocompleteAsync/dictionary';
|
package/components/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { getDataGridComponentsDictionary as getGridComponentsDictionary } from '
|
|
|
13
13
|
export { TextEditor, NumberEditor } from './DataGrid/subcomponents/editors/TextEditor';
|
|
14
14
|
export { getDataGridRowsFromSet } from './DataGrid/utils/getDataGridRowsFromSet';
|
|
15
15
|
export * from './DynamicFilter/index';
|
|
16
|
+
export * from './FieldLabel';
|
|
16
17
|
export * from './HelperText';
|
|
17
18
|
export * from './CommonActions/';
|
|
18
19
|
export * from './CommonActions/dictionary';
|
|
@@ -2,9 +2,9 @@ import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
6
|
-
import { I as Icon } from "../Icon/index.
|
|
7
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
5
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.32fc9419.js";
|
|
6
|
+
import { I as Icon } from "../Icon/index.58eaf354.js";
|
|
7
|
+
import { u as useModal } from "../../hooks/useModal/index.66a0c82e.js";
|
|
8
8
|
const Header = (props) => {
|
|
9
9
|
const {
|
|
10
10
|
title,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as Actions } from "../CommonActions/components/Actions/index.
|
|
1
|
+
import { A as Actions } from "../CommonActions/components/Actions/index.16946bfd.js";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
+
import { u as useModal } from "../../hooks/useModal/index.66a0c82e.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { I as Image } from "../Image/index.
|
|
6
|
+
import { I as Image } from "../Image/index.fa98eb78.js";
|
|
7
7
|
import { m as modalUtilityClasses } from "./index.61389369.js";
|
|
8
|
-
import { W as WindowBase } from "./WindowBase.
|
|
9
|
-
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.
|
|
10
|
-
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.
|
|
8
|
+
import { W as WindowBase } from "./WindowBase.4881da1f.js";
|
|
9
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.bd767c14.js";
|
|
10
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.9bd56cd0.js";
|
|
11
11
|
const dictionary = {
|
|
12
12
|
MESSAGE: "common_actions.confirm_quit_msg"
|
|
13
13
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { generateUtilityClasses, generateUtilityClass, styled, Accordion as Accordion$1, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
2
|
-
import { I as IconButton } from "../IconButton/index.
|
|
2
|
+
import { I as IconButton } from "../IconButton/index.32fc9419.js";
|
|
3
3
|
import { useEnvironment } from "@m4l/core";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { I as Icon } from "../../Icon/index.
|
|
9
|
+
import { I as Icon } from "../../Icon/index.58eaf354.js";
|
|
10
10
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
11
11
|
const componentName = "M4LAccordion";
|
|
12
12
|
generateUtilityClasses(componentName, [
|
|
@@ -5,7 +5,7 @@ import { unstable_composeClasses } from "@mui/base";
|
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
|
-
import { I as Image } from "../../Image/index.
|
|
8
|
+
import { I as Image } from "../../Image/index.fa98eb78.js";
|
|
9
9
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
10
10
|
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
11
11
|
import { T as Typography } from "../Typography/index.379dd374.js";
|
|
@@ -113,8 +113,6 @@ function ImageButton({
|
|
|
113
113
|
src,
|
|
114
114
|
width,
|
|
115
115
|
height,
|
|
116
|
-
useIntersectionObserver,
|
|
117
|
-
skeletonVariant = "circle",
|
|
118
116
|
tooltip,
|
|
119
117
|
sx = {
|
|
120
118
|
width,
|
|
@@ -129,12 +127,10 @@ function ImageButton({
|
|
|
129
127
|
sx,
|
|
130
128
|
...other,
|
|
131
129
|
children: /* @__PURE__ */ jsx(Image, {
|
|
132
|
-
src
|
|
133
|
-
useIntersectionObserver,
|
|
134
|
-
skeletonVariant
|
|
130
|
+
src
|
|
135
131
|
})
|
|
136
132
|
});
|
|
137
|
-
}, [src, width, height,
|
|
133
|
+
}, [src, width, height, sx]);
|
|
138
134
|
return /* @__PURE__ */ jsx(WrapperImageButton, {
|
|
139
135
|
className: classes.root,
|
|
140
136
|
...process.env.NODE_ENV !== "production" ? {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CheckboxProps as MUICheckboxProps } from "@mui/material";
|
|
2
|
+
import { FieldLabelProps } from "../../FieldLabel/types";
|
|
2
3
|
export declare type OwnerState = Pick<CheckboxProps, 'size' | 'disabled'>;
|
|
3
|
-
export interface CheckboxProps extends MUICheckboxProps {
|
|
4
|
+
export interface CheckboxProps extends MUICheckboxProps, Omit<FieldLabelProps, 'label'> {
|
|
4
5
|
label?: string;
|
|
5
6
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass,
|
|
1
|
+
import { generateUtilityClasses, generateUtilityClass, Skeleton, styled, Checkbox } from "@mui/material";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
6
6
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
|
-
import {
|
|
8
|
+
import { F as FieldLabel } from "../FieldLabel/index.8d3d6bb4.js";
|
|
9
9
|
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
10
10
|
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
11
11
|
"root",
|
|
@@ -27,26 +27,12 @@ const useUtilityClasses = (ownerState) => {
|
|
|
27
27
|
...composedClasses
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
const WrapperSkeletonCheckBox = styled("div")(() => ({
|
|
31
|
-
display: "flex",
|
|
32
|
-
justifyContent: "center",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
width: "36px",
|
|
35
|
-
height: "36px"
|
|
36
|
-
}));
|
|
37
|
-
styled("div")(() => ({
|
|
38
|
-
display: "flex",
|
|
39
|
-
justifyContent: "flex-start",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
gap: "8px",
|
|
42
|
-
width: "100%"
|
|
43
|
-
}));
|
|
44
30
|
const SkeletonCheckBox = (props) => {
|
|
45
31
|
const {
|
|
46
32
|
classes
|
|
47
33
|
} = props;
|
|
48
34
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
49
|
-
children: /* @__PURE__ */ jsx(
|
|
35
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
50
36
|
className: classes.skeleton,
|
|
51
37
|
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
52
38
|
variant: "rounded",
|
|
@@ -56,12 +42,19 @@ const SkeletonCheckBox = (props) => {
|
|
|
56
42
|
})
|
|
57
43
|
});
|
|
58
44
|
};
|
|
45
|
+
const CheckBoxRoot = styled("div")(({ theme }) => ({
|
|
46
|
+
...theme.components?.M4LCheckBox?.styleOverrides
|
|
47
|
+
}));
|
|
59
48
|
const CheckBox = forwardRef((props, ref) => {
|
|
60
49
|
const {
|
|
61
50
|
className,
|
|
62
51
|
size = "small",
|
|
63
52
|
disabled,
|
|
64
|
-
label
|
|
53
|
+
label,
|
|
54
|
+
mandatory,
|
|
55
|
+
mandatoryMessage,
|
|
56
|
+
helperMessage,
|
|
57
|
+
htmlFor
|
|
65
58
|
} = props;
|
|
66
59
|
const isDesktop = useResponsiveDesktop();
|
|
67
60
|
const isSkeleton = useModuleSkeleton();
|
|
@@ -70,17 +63,22 @@ const CheckBox = forwardRef((props, ref) => {
|
|
|
70
63
|
disabled
|
|
71
64
|
};
|
|
72
65
|
const classes = useUtilityClasses(ownerState);
|
|
73
|
-
|
|
66
|
+
console.log("checkbox label props", props);
|
|
67
|
+
return /* @__PURE__ */ jsxs(CheckBoxRoot, {
|
|
74
68
|
className: clsx(classes.root, className),
|
|
75
69
|
ref,
|
|
76
70
|
children: [!isSkeleton ? /* @__PURE__ */ jsx(Checkbox, {
|
|
71
|
+
id: htmlFor,
|
|
77
72
|
...props
|
|
78
73
|
}) : /* @__PURE__ */ jsx(SkeletonCheckBox, {
|
|
79
74
|
classes
|
|
80
|
-
}), label
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
}), label && /* @__PURE__ */ jsx(FieldLabel, {
|
|
76
|
+
label,
|
|
77
|
+
mandatory,
|
|
78
|
+
mandatoryMessage,
|
|
79
|
+
helperMessage,
|
|
80
|
+
htmlFor
|
|
81
|
+
})]
|
|
84
82
|
});
|
|
85
83
|
});
|
|
86
84
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../../Icon/index.
|
|
4
|
+
import { I as Icon } from "../../Icon/index.58eaf354.js";
|
|
5
5
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import clsx from "clsx";
|
|
@@ -12,8 +12,6 @@ const SkeletonIconButton = (props) => {
|
|
|
12
12
|
} = props;
|
|
13
13
|
return /* @__PURE__ */ jsx(Skeleton, {
|
|
14
14
|
variant: "rectangular",
|
|
15
|
-
width: "100%",
|
|
16
|
-
height: "100%",
|
|
17
15
|
className: classes.skeleton,
|
|
18
16
|
"data-testid": "SkeletonIconButton"
|
|
19
17
|
});
|
|
@@ -27,7 +25,6 @@ const componentName = "M4LIconButton";
|
|
|
27
25
|
const iconButtonClasses = generateUtilityClasses(componentName, [
|
|
28
26
|
"root",
|
|
29
27
|
"skeleton",
|
|
30
|
-
"sizeExtraSmall",
|
|
31
28
|
"sizemSall",
|
|
32
29
|
"sizeMedium",
|
|
33
30
|
"variantPrimary",
|
|
@@ -43,7 +40,7 @@ function getIconButtonUtilityClass(slot) {
|
|
|
43
40
|
}
|
|
44
41
|
const useUtilityClasses = (ownerState) => {
|
|
45
42
|
const slots = {
|
|
46
|
-
root: ["root", ownerState.size === "
|
|
43
|
+
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.variant === "primary" && ownerState.isSkeleton !== true && "variantPrimary", ownerState.variant === "secondary" && ownerState.isSkeleton !== true && "variantSecondary", ownerState.variant === "line" && ownerState.isSkeleton !== true && "variantLine", ownerState.isFocus && !ownerState.isDisabled && "isFocus", ownerState.isDisabled && "isDisabled"],
|
|
47
44
|
skeleton: ["skeleton"]
|
|
48
45
|
};
|
|
49
46
|
const composedClasses = unstable_composeClasses(slots, getIconButtonUtilityClass, {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from '../../Icon/types';
|
|
2
2
|
import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
|
|
3
3
|
export declare type IconButtonVariants = 'primary' | 'secondary' | 'line';
|
|
4
|
-
export declare type IconButtonSize = '
|
|
4
|
+
export declare type IconButtonSize = 'small' | 'medium';
|
|
5
5
|
export interface IconButtonProps extends Omit<IconProps, 'size'>, Omit<MUIIconButtonProps, 'size'> {
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
dictionaryTooltipId?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ImageButtonProps } from './types';
|
|
2
|
-
export declare function ImageButton({ src, width, height,
|
|
2
|
+
export declare function ImageButton({ src, width, height, tooltip, sx, ...other }: ImageButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React__default, { useState, useEffect, useMemo } from "react";
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
|
-
import { IconButton, generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
4
|
-
import { P as Popover } from "../Popover/index.
|
|
5
|
-
import {
|
|
6
|
-
import { I as Icon } from "../../Icon/index.b920baf8.js";
|
|
3
|
+
import { styled, IconButton, generateUtilityClasses, generateUtilityClass, useTheme, MenuItem } from "@mui/material";
|
|
4
|
+
import { P as Popover } from "../Popover/index.d85de73b.js";
|
|
5
|
+
import { I as Icon } from "../../Icon/index.58eaf354.js";
|
|
7
6
|
import clsx from "clsx";
|
|
8
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
9
8
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
10
9
|
import { B as Badge } from "../Badge/index.09f5aee5.js";
|
|
11
|
-
import { I as IconButton$1 } from "../IconButton/index.
|
|
10
|
+
import { I as IconButton$1 } from "../IconButton/index.32fc9419.js";
|
|
12
11
|
styled(IconButton)(() => ({}));
|
|
13
12
|
const LabelMemuItem = styled("div")(({
|
|
14
13
|
theme
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { styled } from "@mui/material
|
|
3
|
-
import { generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
2
|
+
import { styled, generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
4
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { I as IconButton } from "../IconButton/index.
|
|
4
|
+
import { I as IconButton } from "../IconButton/index.32fc9419.js";
|
|
6
5
|
import { useEnvironment } from "@m4l/core";
|
|
7
6
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
7
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { styled, Popover as Popover$1, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { styled as styled$1 } from "@mui/material/styles";
|
|
4
3
|
import clsx from "clsx";
|
|
5
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
6
5
|
const PopoverRoot = styled(Popover$1)(({
|
|
@@ -38,7 +37,7 @@ const useUtilityClasses = (ownerState) => {
|
|
|
38
37
|
...composedClasses
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
|
-
const ArrowStyle = styled
|
|
40
|
+
const ArrowStyle = styled("span")(({
|
|
42
41
|
arrowType,
|
|
43
42
|
theme
|
|
44
43
|
}) => {
|
|
@@ -3,7 +3,6 @@ import { generateUtilityClasses, generateUtilityClass, styled, Tabs as Tabs$1, T
|
|
|
3
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
6
|
-
import { styled as styled$1 } from "@mui/material/styles";
|
|
7
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
7
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
|
|
9
8
|
import { createContext, useState } from "react";
|
|
@@ -71,12 +70,12 @@ const TabContent = (props) => {
|
|
|
71
70
|
children
|
|
72
71
|
});
|
|
73
72
|
};
|
|
74
|
-
const TabRoot = styled
|
|
73
|
+
const TabRoot = styled("div")(({
|
|
75
74
|
theme
|
|
76
75
|
}) => ({
|
|
77
76
|
...theme.components?.M4LTab?.styleOverrides
|
|
78
77
|
}));
|
|
79
|
-
const SKTTabWrapper = styled
|
|
78
|
+
const SKTTabWrapper = styled("div")(({
|
|
80
79
|
theme
|
|
81
80
|
}) => ({
|
|
82
81
|
padding: theme.spacing(1.5, 2)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import { B as Button, b as buttonClasses } from "../Button/index.
|
|
2
|
+
import { B as Button, b as buttonClasses } from "../Button/index.81367a73.js";
|
|
3
3
|
import { w as withToggle } from "../../../hocs/withToggle/index.e44eb0da.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const ToggleAbleButton = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.
|
|
2
|
+
import { I as IconButton, i as iconButtonClasses } from "../IconButton/index.32fc9419.js";
|
|
3
3
|
import { w as withToggle } from "../../../hocs/withToggle/index.e44eb0da.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const ToggleAbleIconButton = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useState } from "react";
|
|
2
|
-
import { M as ModalDialog } from "../../components/ModalDialog/index.
|
|
2
|
+
import { M as ModalDialog } from "../../components/ModalDialog/index.86de725b.js";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({
|
|
@@ -2,8 +2,7 @@ import { useEffect } from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useForm, FormProvider } from "react-hook-form";
|
|
4
4
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
5
|
-
import { styled } from "@mui/material
|
|
6
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
5
|
+
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
const FormProviderRoot = styled("form")(({
|
package/hooks/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNetwork, useFlags, useModuleDictionary } from "@m4l/core";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { u as useModal } from "../useModal/index.
|
|
3
|
+
import { u as useModal } from "../useModal/index.66a0c82e.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.
|
|
5
|
+
import { W as WindowConfirm } from "../../components/modal/WindowConfirm.3b0e842b.js";
|
|
6
6
|
function useFormAddEdit(props) {
|
|
7
7
|
const {
|
|
8
8
|
initialValues,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormFocusHookReturnType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* useFormFocus: Custom hook creado para facilitar el manejo de estado de interacción de usuario para los
|
|
4
|
+
* componentes de formulario. Aporta los estados Focus, TabSelected y
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare const useFormFocus: <ElmentType extends HTMLElement>() => FormFocusHookReturnType<ElmentType>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KeyboardEvent } from "react";
|
|
2
|
+
export interface FormFocusHookReturnType<ElementType extends HTMLElement> {
|
|
3
|
+
isFocus: boolean;
|
|
4
|
+
isTabSelected: boolean;
|
|
5
|
+
handlerFocus: () => void;
|
|
6
|
+
handlerOnKeyUp: (event: KeyboardEvent<ElementType>) => void;
|
|
7
|
+
handlerOnBlur: () => void;
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.
|
|
2
|
+
import { M as ModalContext } from "../../contexts/ModalContext/index.e748f329.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|