@m4l/components 9.84.1 → 9.85.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/components/CheckableList/CheckableList.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.js +250 -219
- package/components/CheckableList/CheckableList.styles.d.ts.map +1 -1
- package/components/CheckableList/CheckableList.styles.js +12 -0
- package/components/CheckableList/constants.d.ts +1 -1
- package/components/CheckableList/constants.d.ts.map +1 -1
- package/components/CheckableList/dictionary.d.ts +4 -2
- package/components/CheckableList/dictionary.d.ts.map +1 -1
- package/components/CheckableList/dictionary.js +6 -1
- package/components/CheckableList/dictionaryDefaults.d.ts +26 -0
- package/components/CheckableList/dictionaryDefaults.d.ts.map +1 -0
- package/components/CheckableList/dictionaryDefaults.js +31 -0
- package/components/CheckableList/hooks/types.d.ts +9 -0
- package/components/CheckableList/hooks/types.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListHandlers.d.ts +2 -1
- package/components/CheckableList/hooks/useCheckableListHandlers.d.ts.map +1 -1
- package/components/CheckableList/hooks/useCheckableListHandlers.js +54 -40
- package/components/CheckableList/hooks/useCheckableListValue.d.ts +4 -0
- package/components/CheckableList/hooks/useCheckableListValue.d.ts.map +1 -0
- package/components/CheckableList/hooks/useCheckableListValue.js +28 -0
- package/components/CheckableList/index.d.ts +2 -0
- package/components/CheckableList/index.d.ts.map +1 -1
- package/components/CheckableList/slots/slots.d.ts +1 -0
- package/components/CheckableList/slots/slots.d.ts.map +1 -1
- package/components/CheckableList/slots/slots.js +1 -1
- package/components/CheckableList/slots/styled.d.ts +3 -0
- package/components/CheckableList/slots/styled.d.ts.map +1 -1
- package/components/CheckableList/slots/styled.js +62 -58
- package/components/CheckableList/types.d.ts +4 -0
- package/components/CheckableList/types.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +132 -118
- package/components/DragResizeWindowRND/constants.d.ts +1 -0
- package/components/DragResizeWindowRND/constants.d.ts.map +1 -1
- package/components/DragResizeWindowRND/constants.js +3 -2
- package/components/DragResizeWindowRND/hooks/types.d.ts +15 -0
- package/components/DragResizeWindowRND/hooks/types.d.ts.map +1 -0
- package/components/DragResizeWindowRND/hooks/useRNDCollapse.d.ts +4 -0
- package/components/DragResizeWindowRND/hooks/useRNDCollapse.d.ts.map +1 -0
- package/components/DragResizeWindowRND/hooks/useRNDCollapse.js +41 -0
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts +1 -0
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.d.ts.map +1 -1
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +21 -19
- package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts +2 -0
- package/components/DragResizeWindowRND/hooks/useRNDDragOptions.d.ts.map +1 -1
- package/components/DragResizeWindowRND/hooks/useRNDDragOptions.js +55 -54
- package/components/DragResizeWindowRND/types.d.ts +4 -0
- package/components/DragResizeWindowRND/types.d.ts.map +1 -1
- package/components/Label/Label.d.ts +2 -5
- package/components/Label/Label.d.ts.map +1 -1
- package/components/Label/Label.js +34 -35
- package/components/SortableList/dictionaryDefaults.d.ts +7 -0
- package/components/SortableList/dictionaryDefaults.d.ts.map +1 -0
- package/components/SortableList/dictionaryDefaults.js +34 -0
- package/components/SortableList/index.d.ts +1 -0
- package/components/SortableList/index.d.ts.map +1 -1
- package/components/Stepper/helpers/focusFirstErrorField/index.d.ts +1 -1
- package/components/Stepper/helpers/focusFirstErrorField/index.d.ts.map +1 -1
- package/components/Stepper/helpers/focusFirstErrorField/index.js +29 -14
- package/components/Stepper/helpers/getStepFocusTargets/constants.d.ts +4 -0
- package/components/Stepper/helpers/getStepFocusTargets/constants.d.ts.map +1 -0
- package/components/Stepper/helpers/getStepFocusTargets/constants.js +32 -0
- package/components/Stepper/helpers/getStepFocusTargets/index.d.ts +10 -0
- package/components/Stepper/helpers/getStepFocusTargets/index.d.ts.map +1 -0
- package/components/Stepper/helpers/getStepFocusTargets/index.js +34 -0
- package/components/Stepper/helpers/getStepFocusTargets/types.d.ts +6 -0
- package/components/Stepper/helpers/getStepFocusTargets/types.d.ts.map +1 -0
- package/components/Stepper/hooks/useStepEntryFocus/index.d.ts +4 -0
- package/components/Stepper/hooks/useStepEntryFocus/index.d.ts.map +1 -0
- package/components/Stepper/hooks/useStepEntryFocus/index.js +59 -0
- package/components/Stepper/hooks/useStepEntryFocus/types.d.ts +9 -0
- package/components/Stepper/hooks/useStepEntryFocus/types.d.ts.map +1 -0
- package/components/Stepper/hooks/useStepperActions/index.d.ts.map +1 -1
- package/components/Stepper/hooks/useStepperActions/index.js +53 -43
- package/components/Stepper/index.d.ts +1 -0
- package/components/Stepper/index.d.ts.map +1 -1
- package/components/Stepper/store/StepperContext/index.d.ts.map +1 -1
- package/components/Stepper/store/StepperContext/index.js +37 -35
- package/components/Stepper/store/StepperFocusContext/index.d.ts +5 -0
- package/components/Stepper/store/StepperFocusContext/index.d.ts.map +1 -0
- package/components/Stepper/store/StepperFocusContext/index.js +9 -0
- package/components/Stepper/store/StepperFocusContext/types.d.ts +8 -0
- package/components/Stepper/store/StepperFocusContext/types.d.ts.map +1 -0
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.d.ts.map +1 -1
- package/components/Stepper/subcomponents/StepArea/hooks/useStepArea.js +74 -57
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts.map +1 -1
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +21 -6
- package/components/Stepper/tests/focus/fixtures.d.ts +8 -0
- package/components/Stepper/tests/focus/fixtures.d.ts.map +1 -0
- package/components/Stepper/tests/focus/types.d.ts +63 -0
- package/components/Stepper/tests/focus/types.d.ts.map +1 -0
- package/components/Stepper/types.d.ts +8 -0
- package/components/Stepper/types.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.js +74 -64
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +16 -5
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +59 -58
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Header/types.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +13 -12
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +5 -5
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +2 -0
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts.map +1 -1
- package/components/WindowBase/types.d.ts +7 -1
- package/components/WindowBase/types.d.ts.map +1 -1
- package/components/areas/types.d.ts +1 -1
- package/components/areas/types.d.ts.map +1 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +2 -2
- package/components/extended/mui/Autocomplete/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
- package/components/extended/mui/Autocomplete/hooks/useEndAdornments.d.ts +2 -1
- package/components/extended/mui/Autocomplete/hooks/useEndAdornments.d.ts.map +1 -1
- package/components/extended/mui/Autocomplete/hooks/useEndAdornments.js +65 -58
- package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.d.ts +1 -1
- package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.d.ts.map +1 -1
- package/components/extended/mui/Autocomplete/hooks/useValuesAndHandlers.js +51 -51
- package/components/extended/mui/Autocomplete/tests/keyboard/AutocompleteKeyboardFixture.d.ts +5 -0
- package/components/extended/mui/Autocomplete/tests/keyboard/AutocompleteKeyboardFixture.d.ts.map +1 -0
- package/components/extended/mui/Autocomplete/tests/keyboard/constants.d.ts +3 -0
- package/components/extended/mui/Autocomplete/tests/keyboard/constants.d.ts.map +1 -0
- package/components/extended/mui/Autocomplete/tests/keyboard/types.d.ts +17 -0
- package/components/extended/mui/Autocomplete/tests/keyboard/types.d.ts.map +1 -0
- package/components/extended/mui/Select/Select.d.ts.map +1 -1
- package/components/extended/mui/Select/Select.js +99 -94
- package/components/extended/mui/Select/Select.styles.d.ts.map +1 -1
- package/components/extended/mui/Select/Select.styles.js +48 -39
- package/components/extended/mui/Select/tests/keyboard/SelectKeyboardFixture.d.ts +4 -0
- package/components/extended/mui/Select/tests/keyboard/SelectKeyboardFixture.d.ts.map +1 -0
- package/components/extended/mui/Select/tests/keyboard/types.d.ts +6 -0
- package/components/extended/mui/Select/tests/keyboard/types.d.ts.map +1 -0
- package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.d.ts +2 -6
- package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.d.ts.map +1 -1
- package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +18 -17
- package/components/formatters/DistanceToNowFormatter/dictionary.d.ts +18 -0
- package/components/formatters/DistanceToNowFormatter/dictionary.d.ts.map +1 -1
- package/components/formatters/DistanceToNowFormatter/dictionary.js +19 -1
- package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.d.ts +96 -0
- package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.d.ts.map +1 -0
- package/components/formatters/DistanceToNowFormatter/dictionaryDefaults.js +101 -0
- package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts +4 -9
- package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts.map +1 -1
- package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js +41 -15
- package/components/formatters/DistanceToNowFormatter/index.d.ts +1 -0
- package/components/formatters/DistanceToNowFormatter/index.d.ts.map +1 -1
- package/components/formatters/DistanceToNowFormatter/types.d.ts +10 -3
- package/components/formatters/DistanceToNowFormatter/types.d.ts.map +1 -1
- package/components/hook-form/RHFActionsGroup/RHFActionsGroup.d.ts.map +1 -1
- package/components/hook-form/RHFActionsGroup/RHFActionsGroup.js +43 -40
- package/components/hook-form/RHFCheckableList/RHFCheckableList.d.ts.map +1 -1
- package/components/hook-form/RHFCheckableList/RHFCheckableList.js +82 -73
- package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts.map +1 -1
- package/components/hook-form/RHFCheckbox/RHFCheckbox.js +62 -53
- package/components/hook-form/RHFDatePicker/RHFDatePicker.d.ts.map +1 -1
- package/components/hook-form/RHFDatePicker/RHFDatePicker.js +35 -32
- package/components/hook-form/RHFDateTime/RHFDateTime.d.ts.map +1 -1
- package/components/hook-form/RHFDateTime/RHFDateTime.js +42 -39
- package/components/hook-form/RHFMultiCheckbox/index.d.ts.map +1 -1
- package/components/hook-form/RHFMultiCheckbox/index.js +20 -17
- package/components/hook-form/RHFNumberInput/RHFNumberInput.d.ts.map +1 -1
- package/components/hook-form/RHFNumberInput/RHFNumberInput.js +46 -43
- package/components/hook-form/RHFPeriod/RHFPeriod.d.ts.map +1 -1
- package/components/hook-form/RHFPeriod/RHFPeriod.js +41 -39
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.d.ts.map +1 -1
- package/components/hook-form/RHFRadioGroup/RHFRadioGroup.js +62 -59
- package/components/hook-form/RHFSelect/RHFSelect.d.ts.map +1 -1
- package/components/hook-form/RHFSelect/RHFSelect.js +89 -73
- package/components/hook-form/RHFSelect/test/focus/SelectFocusFixture.d.ts +4 -0
- package/components/hook-form/RHFSelect/test/focus/SelectFocusFixture.d.ts.map +1 -0
- package/components/hook-form/RHFSelect/test/focus/constants.d.ts +3 -0
- package/components/hook-form/RHFSelect/test/focus/constants.d.ts.map +1 -0
- package/components/hook-form/RHFSelect/test/focus/types.d.ts +13 -0
- package/components/hook-form/RHFSelect/test/focus/types.d.ts.map +1 -0
- package/components/hook-form/RHFSelect/types.d.ts +5 -0
- package/components/hook-form/RHFSelect/types.d.ts.map +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.d.ts.map +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +55 -52
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.d.ts.map +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +93 -85
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/index.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/index.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/types.d.ts +2 -0
- package/components/hook-form/RHFUpload/RHFUploaMultipleFile/types.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.js +74 -66
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.styles.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/RHFUploadImage.styles.js +52 -32
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/UploadImageFocusFixture.d.ts +4 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/UploadImageFocusFixture.d.ts.map +1 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/types.d.ts +13 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/tests/focus/types.d.ts.map +1 -0
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.d.ts.map +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +34 -32
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/subcomponents/UploadSingleFile/index.js +13 -13
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +16 -16
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +4 -2
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/types.d.ts +5 -0
- package/components/popups/components/PopupsProvider/hooks/types.d.ts.map +1 -0
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.d.ts +3 -14
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/useHeaderActionsPopups.js +34 -33
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.d.ts.map +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +125 -118
- package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.d.ts +3 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.d.ts.map +1 -0
- package/components/popups/components/PopupsViewer/subcomponents/Popup/usePopupHeaderHeight.js +21 -0
- package/components/popups/dictionaryDefaults.d.ts +4 -0
- package/components/popups/dictionaryDefaults.d.ts.map +1 -0
- package/components/popups/dictionaryDefaults.js +16 -0
- package/components/popups/index.d.ts +1 -0
- package/components/popups/index.d.ts.map +1 -1
- package/hocs/withRHFController/index.d.ts.map +1 -1
- package/hocs/withRHFController/index.js +71 -61
- package/index.js +823 -813
- package/package.json +12 -12
- package/test/mocks/dictionary-mock.d.ts +71 -23
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +2 -2
- package/utils/formatDistanceToNow/formatDistanteToNow.d.ts.map +1 -1
- package/utils/formatDistanceToNow/formatDistanteToNow.js +40 -23
- package/utils/formatDistanceToNow/index.d.ts +1 -1
- package/utils/formatDistanceToNow/index.d.ts.map +1 -1
- package/utils/formatDistanceToNow/types.d.ts +12 -6
- package/utils/formatDistanceToNow/types.d.ts.map +1 -1
|
@@ -1,86 +1,102 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as j, Fragment as B } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import M from "clsx";
|
|
3
|
-
import { RHFSELECT_CLASSES as
|
|
3
|
+
import { RHFSELECT_CLASSES as f, RHFSELECT_COMPONENT_KEY as O } from "./constants.js";
|
|
4
4
|
import { RHFSelectEnum as _ } from "./slots/RHFSelectEnum.js";
|
|
5
|
-
import { RootStyled as
|
|
6
|
-
import { useFormContext as
|
|
7
|
-
import { getPropDataTestId as
|
|
8
|
-
import { useComponentSize as
|
|
9
|
-
import { useId as
|
|
10
|
-
const
|
|
5
|
+
import { RootStyled as P, LabelStyled as $, SelectStyled as v, HelperErrorStyled as D } from "./slots/RHFSlots.js";
|
|
6
|
+
import { useFormContext as K, Controller as Y } from "react-hook-form";
|
|
7
|
+
import { getPropDataTestId as q } from "../../../test/getNameDataTestId.js";
|
|
8
|
+
import { useComponentSize as w } from "../../../hooks/useComponentSize/index.js";
|
|
9
|
+
import { useId as G } from "react";
|
|
10
|
+
const oe = (S) => {
|
|
11
11
|
const {
|
|
12
|
-
id:
|
|
13
|
-
name:
|
|
12
|
+
id: u,
|
|
13
|
+
name: i,
|
|
14
14
|
multiple: m,
|
|
15
|
-
options:
|
|
16
|
-
label:
|
|
17
|
-
labelSkeletonWidth:
|
|
18
|
-
helperErrorSkeletonWidth:
|
|
19
|
-
helperMessage:
|
|
20
|
-
mandatory:
|
|
21
|
-
mandatoryMessage:
|
|
15
|
+
options: h,
|
|
16
|
+
label: n,
|
|
17
|
+
labelSkeletonWidth: p,
|
|
18
|
+
helperErrorSkeletonWidth: y,
|
|
19
|
+
helperMessage: E,
|
|
20
|
+
mandatory: b,
|
|
21
|
+
mandatoryMessage: C,
|
|
22
22
|
placeholder: F,
|
|
23
|
-
disabled:
|
|
23
|
+
disabled: o,
|
|
24
24
|
size: g = "medium",
|
|
25
25
|
variant: z = "outlined",
|
|
26
|
-
className:
|
|
27
|
-
dataTestId:
|
|
28
|
-
readOnly:
|
|
29
|
-
} =
|
|
30
|
-
return /* @__PURE__ */ t(
|
|
31
|
-
|
|
26
|
+
className: I,
|
|
27
|
+
dataTestId: R,
|
|
28
|
+
readOnly: c = !1
|
|
29
|
+
} = S, x = G(), l = u || x, { currentSize: a } = w(g), s = a === "small" || a === "medium" ? a : "medium", { control: A } = K();
|
|
30
|
+
return /* @__PURE__ */ t(
|
|
31
|
+
P,
|
|
32
32
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
className: M(f.root, I),
|
|
34
|
+
"data-rhf-field": i,
|
|
35
|
+
"data-rhf-disabled": !!o,
|
|
36
|
+
"data-rhf-readonly": c,
|
|
37
|
+
children: /* @__PURE__ */ t(
|
|
38
|
+
Y,
|
|
39
|
+
{
|
|
40
|
+
name: i,
|
|
41
|
+
control: A,
|
|
42
|
+
render: ({ field: { value: H, onChange: d, ref: L }, fieldState: { error: r }, formState: { isSubmitting: N } }) => {
|
|
43
|
+
const T = (e) => {
|
|
44
|
+
L(e && {
|
|
45
|
+
...e,
|
|
46
|
+
focus: () => {
|
|
47
|
+
e.node.isConnected && e.focus();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}, k = (e) => {
|
|
51
|
+
if (!e) {
|
|
52
|
+
d(null);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
m && Array.isArray(e) ? d(e.map((W) => W.id)) : Array.isArray(e) || d(e.id);
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ j(B, { children: [
|
|
58
|
+
n && /* @__PURE__ */ t(
|
|
59
|
+
$,
|
|
60
|
+
{
|
|
61
|
+
id: `${l}-label`,
|
|
62
|
+
htmlFor: l,
|
|
63
|
+
label: n,
|
|
64
|
+
mandatory: b,
|
|
65
|
+
mandatoryMessage: C,
|
|
66
|
+
helperMessage: E,
|
|
67
|
+
size: s,
|
|
68
|
+
skeletonWidth: p,
|
|
69
|
+
error: !!r,
|
|
70
|
+
disabled: o
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ t(
|
|
74
|
+
v,
|
|
75
|
+
{
|
|
76
|
+
labelId: `${l}-label`,
|
|
77
|
+
inputRef: T,
|
|
78
|
+
options: h,
|
|
79
|
+
multiple: m,
|
|
80
|
+
size: s,
|
|
81
|
+
variant: z,
|
|
82
|
+
value: H,
|
|
83
|
+
onChange: k,
|
|
84
|
+
disabled: o || N,
|
|
85
|
+
readOnly: c,
|
|
86
|
+
className: f.select,
|
|
87
|
+
error: !!r,
|
|
88
|
+
placeholder: F,
|
|
89
|
+
...q(O, _.select, R)
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
r?.message && /* @__PURE__ */ t(D, { size: s, message: r.message, skeletonWidth: y })
|
|
93
|
+
] });
|
|
40
94
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return /* @__PURE__ */ W(j, { children: [
|
|
44
|
-
i && /* @__PURE__ */ t(
|
|
45
|
-
P,
|
|
46
|
-
{
|
|
47
|
-
id: `${l}-label`,
|
|
48
|
-
htmlFor: l,
|
|
49
|
-
label: i,
|
|
50
|
-
mandatory: E,
|
|
51
|
-
mandatoryMessage: b,
|
|
52
|
-
helperMessage: y,
|
|
53
|
-
size: s,
|
|
54
|
-
skeletonWidth: u,
|
|
55
|
-
error: !!r,
|
|
56
|
-
disabled: d
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ t(
|
|
60
|
-
$,
|
|
61
|
-
{
|
|
62
|
-
labelId: `${l}-label`,
|
|
63
|
-
ref: N,
|
|
64
|
-
options: p,
|
|
65
|
-
multiple: m,
|
|
66
|
-
size: s,
|
|
67
|
-
variant: z,
|
|
68
|
-
value: L,
|
|
69
|
-
onChange: T,
|
|
70
|
-
disabled: d || R,
|
|
71
|
-
readOnly: x,
|
|
72
|
-
className: n.select,
|
|
73
|
-
error: !!r,
|
|
74
|
-
placeholder: F,
|
|
75
|
-
...Y(O, _.select, I)
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
r?.message && /* @__PURE__ */ t(v, { size: s, message: r.message, skeletonWidth: h })
|
|
79
|
-
] });
|
|
80
|
-
}
|
|
95
|
+
}
|
|
96
|
+
)
|
|
81
97
|
}
|
|
82
|
-
)
|
|
98
|
+
);
|
|
83
99
|
};
|
|
84
100
|
export {
|
|
85
|
-
|
|
101
|
+
oe as RHFSelect
|
|
86
102
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SelectFocusFixtureProps } from './types';
|
|
2
|
+
/** Keep RHF's real registered reference and the real Select implementation in the same fixture. */
|
|
3
|
+
export declare function SelectFocusFixture({ multiple, readOnly, disabled, onMethods }: SelectFocusFixtureProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=SelectFocusFixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectFocusFixture.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/hook-form/RHFSelect/test/focus/SelectFocusFixture.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAyB,MAAM,SAAS,CAAC;AAE9E,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,EAAE,QAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,oDAU9G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/hook-form/RHFSelect/test/focus/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,MAAM,CAAC,EAItD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
/** Stored values stay unchanged when the registered Select receives focus. */
|
|
3
|
+
export interface SelectFocusFormValues {
|
|
4
|
+
selection: string | string[];
|
|
5
|
+
}
|
|
6
|
+
/** Real RHF composition inputs for the single and multiple focus contracts. */
|
|
7
|
+
export interface SelectFocusFixtureProps {
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onMethods: (methods: UseFormReturn<SelectFocusFormValues>) => void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/hook-form/RHFSelect/test/focus/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,8EAA8E;AAC9E,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED,+EAA+E;AAC/E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAC;CACpE"}
|
|
@@ -6,6 +6,11 @@ import { M4LOverridesStyleRules } from '../../../@types/augmentations';
|
|
|
6
6
|
import { RHFSelectEnum } from './slots/RHFSelectEnum';
|
|
7
7
|
import { RHFSELECT_COMPONENT_KEY } from './constants';
|
|
8
8
|
import { Theme } from '@mui/material';
|
|
9
|
+
/** MUI non-native Select focus handle. / Manejador de foco del Select no nativo de MUI. */
|
|
10
|
+
export interface RHFSelectInputHandle {
|
|
11
|
+
node: HTMLInputElement;
|
|
12
|
+
focus: () => void;
|
|
13
|
+
}
|
|
9
14
|
/**
|
|
10
15
|
* Props para el componente RHFSelect, incluye las propedades esceciales del Select, Label,
|
|
11
16
|
* así como las propiedades requeridas por react hook form.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFSelect/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,CAAE,SACvG,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,EAC/F,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;IAC3G;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACjD;;OAEG;IACH,wBAAwB,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;CAC9D;AACD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,aAAa,CAAC;AAC5D;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,aAAa,EAAE,OAAO,uBAAuB,EAAE,KAAK,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFSelect/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,2FAA2F;AAC3F,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AACD;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,CAAE,SACvG,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,EAC/F,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC;IAC3G;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACjD;;OAEG;IACH,wBAAwB,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;CAC9D;AACD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,aAAa,CAAC;AAC5D;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,aAAa,EAAE,OAAO,uBAAuB,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RHFTextField.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFTextField/RHFTextField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,SAAS,CAAC;AASpE;;GAEG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"RHFTextField.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFTextField/RHFTextField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,SAAS,CAAC;AASpE;;GAEG;AACH,eAAO,MAAM,YAAY,2HAmIvB,CAAC"}
|
|
@@ -1,76 +1,79 @@
|
|
|
1
1
|
import { jsx as e, jsxs as X, Fragment as Y } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as $, useId as q } from "react";
|
|
3
3
|
import { useFormContext as G, Controller as J } from "react-hook-form";
|
|
4
|
-
import { InputAdornment as
|
|
5
|
-
import { getPropDataTestId as
|
|
4
|
+
import { InputAdornment as y } from "@mui/material";
|
|
5
|
+
import { getPropDataTestId as F } from "../../../test/getNameDataTestId.js";
|
|
6
6
|
import { RHF_TEXT_FIELD_KEY_COMPONENT as m } from "./constant.js";
|
|
7
7
|
import { useComponentSize as Q } from "../../../hooks/useComponentSize/index.js";
|
|
8
8
|
import { getComponentSlotRoot as U } from "../../../utils/getComponentSlotRoot.js";
|
|
9
9
|
import Z from "clsx";
|
|
10
10
|
import { RHFTextFieldRootStyled as ee, LabelStyled as te, TextFieldStyled as re, HelperErrorStyled as oe } from "./slots/RHFTextFieldSlots.js";
|
|
11
|
-
import { RHFTextFieldSlots as
|
|
12
|
-
import { getLimitCharacters as
|
|
13
|
-
const
|
|
11
|
+
import { RHFTextFieldSlots as S } from "./slots/RHFTextFieldEnum.js";
|
|
12
|
+
import { getLimitCharacters as ae } from "../../../utils/getLimitCharacters/getLimitCharacters.js";
|
|
13
|
+
const ne = $((x, I) => {
|
|
14
14
|
const {
|
|
15
|
-
name:
|
|
15
|
+
name: t,
|
|
16
16
|
autoComplete: b = "off",
|
|
17
|
-
type:
|
|
18
|
-
label:
|
|
17
|
+
type: p,
|
|
18
|
+
label: f,
|
|
19
19
|
symbol: C,
|
|
20
20
|
size: R = "medium",
|
|
21
21
|
startIcon: u,
|
|
22
22
|
endIcon: c,
|
|
23
23
|
helperMessage: T = "",
|
|
24
|
-
disabled:
|
|
24
|
+
disabled: l,
|
|
25
25
|
mandatory: z,
|
|
26
26
|
variant: L = "outlined",
|
|
27
27
|
color: O = "default",
|
|
28
28
|
isInteger: w = !0,
|
|
29
29
|
mandatoryMessage: H,
|
|
30
|
-
helperText:
|
|
30
|
+
helperText: le = !0,
|
|
31
31
|
className: v,
|
|
32
32
|
htmlFor: E,
|
|
33
|
-
InputProps:
|
|
33
|
+
InputProps: h,
|
|
34
34
|
readOnly: N = !1,
|
|
35
|
-
...
|
|
36
|
-
} = x, P = q(),
|
|
35
|
+
...s
|
|
36
|
+
} = x, P = q(), r = E ?? P, _ = `field-label-${r}`, {
|
|
37
37
|
control: j
|
|
38
|
-
} = G(), { currentSize:
|
|
39
|
-
name:
|
|
38
|
+
} = G(), { currentSize: i } = Q(R), o = i === "small" || i === "medium" ? i : "medium", a = !!(N || h?.readOnly), d = {
|
|
39
|
+
name: t,
|
|
40
40
|
color: O,
|
|
41
41
|
isInteger: w,
|
|
42
|
-
type:
|
|
43
|
-
size:
|
|
44
|
-
disabled:
|
|
45
|
-
readOnly:
|
|
42
|
+
type: p ?? "text",
|
|
43
|
+
size: o,
|
|
44
|
+
disabled: l,
|
|
45
|
+
readOnly: a
|
|
46
46
|
}, A = U(m);
|
|
47
47
|
return /* @__PURE__ */ e(
|
|
48
48
|
ee,
|
|
49
49
|
{
|
|
50
|
-
|
|
50
|
+
"data-rhf-field": t,
|
|
51
|
+
"data-rhf-disabled": !!l,
|
|
52
|
+
"data-rhf-readonly": a,
|
|
53
|
+
ownerState: { ...d },
|
|
51
54
|
className: Z(A, v),
|
|
52
|
-
...
|
|
55
|
+
...F(m, S.root),
|
|
53
56
|
children: /* @__PURE__ */ e(
|
|
54
57
|
J,
|
|
55
58
|
{
|
|
56
|
-
name:
|
|
59
|
+
name: t,
|
|
57
60
|
control: j,
|
|
58
|
-
render: ({ field: { onChange:
|
|
59
|
-
const k = (
|
|
60
|
-
if (
|
|
61
|
+
render: ({ field: { onChange: B, value: M, ref: D }, fieldState: { error: n }, formState: { isSubmitting: V } }) => {
|
|
62
|
+
const k = (g) => {
|
|
63
|
+
if (a)
|
|
61
64
|
return;
|
|
62
|
-
const K =
|
|
63
|
-
|
|
65
|
+
const K = s.maxLength ? ae({ limitCharacters: s.maxLength, value: g.target.value }) : g.target.value, W = String(K || "");
|
|
66
|
+
B(W);
|
|
64
67
|
};
|
|
65
68
|
return /* @__PURE__ */ X(Y, { children: [
|
|
66
|
-
|
|
69
|
+
f && /* @__PURE__ */ e(
|
|
67
70
|
te,
|
|
68
71
|
{
|
|
69
|
-
ownerState: { ...
|
|
70
|
-
size:
|
|
71
|
-
label:
|
|
72
|
+
ownerState: { ...d },
|
|
73
|
+
size: o,
|
|
74
|
+
label: f,
|
|
72
75
|
symbol: C,
|
|
73
|
-
htmlFor:
|
|
76
|
+
htmlFor: r,
|
|
74
77
|
mandatory: z,
|
|
75
78
|
mandatoryMessage: H,
|
|
76
79
|
helperMessage: T
|
|
@@ -79,43 +82,43 @@ const le = $((x, I) => {
|
|
|
79
82
|
/* @__PURE__ */ e(
|
|
80
83
|
re,
|
|
81
84
|
{
|
|
82
|
-
ownerState: { ...
|
|
83
|
-
disabled:
|
|
84
|
-
size:
|
|
85
|
+
ownerState: { ...d, error: !!n },
|
|
86
|
+
disabled: l || V,
|
|
87
|
+
size: o,
|
|
85
88
|
inputRef: D,
|
|
86
89
|
ref: I,
|
|
87
90
|
InputLabelProps: { shrink: !0 },
|
|
88
91
|
autoComplete: b,
|
|
89
92
|
onChange: k,
|
|
90
93
|
variant: L,
|
|
91
|
-
value: String(
|
|
94
|
+
value: String(M || ""),
|
|
92
95
|
fullWidth: !0,
|
|
93
|
-
error: !!
|
|
94
|
-
type:
|
|
96
|
+
error: !!n,
|
|
97
|
+
type: p,
|
|
95
98
|
InputProps: {
|
|
96
|
-
...
|
|
97
|
-
readOnly:
|
|
98
|
-
name:
|
|
99
|
-
id:
|
|
99
|
+
...h,
|
|
100
|
+
readOnly: a,
|
|
101
|
+
name: t,
|
|
102
|
+
id: r,
|
|
100
103
|
"aria-labelledby": _,
|
|
101
|
-
...
|
|
104
|
+
...F(m, S.textField),
|
|
102
105
|
...u && {
|
|
103
|
-
startAdornment: /* @__PURE__ */ e(
|
|
106
|
+
startAdornment: /* @__PURE__ */ e(y, { position: "start", children: u })
|
|
104
107
|
},
|
|
105
108
|
...c && {
|
|
106
|
-
endAdornment: /* @__PURE__ */ e(
|
|
109
|
+
endAdornment: /* @__PURE__ */ e(y, { position: "end", children: c })
|
|
107
110
|
}
|
|
108
111
|
},
|
|
109
|
-
...
|
|
112
|
+
...s
|
|
110
113
|
}
|
|
111
114
|
),
|
|
112
|
-
|
|
115
|
+
n?.message ? /* @__PURE__ */ e(
|
|
113
116
|
oe,
|
|
114
117
|
{
|
|
115
118
|
ownerState: {},
|
|
116
|
-
message:
|
|
117
|
-
size:
|
|
118
|
-
htmlFor:
|
|
119
|
+
message: n.message,
|
|
120
|
+
size: o,
|
|
121
|
+
htmlFor: r
|
|
119
122
|
}
|
|
120
123
|
) : null
|
|
121
124
|
] });
|
|
@@ -125,7 +128,7 @@ const le = $((x, I) => {
|
|
|
125
128
|
}
|
|
126
129
|
);
|
|
127
130
|
});
|
|
128
|
-
|
|
131
|
+
ne.displayName = "RHFTextField";
|
|
129
132
|
export {
|
|
130
|
-
|
|
133
|
+
ne as RHFTextField
|
|
131
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RHFTextFieldPassword.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAOpD;;;;GAIG;AACH;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,yBAAyB,
|
|
1
|
+
{"version":3,"file":"RHFTextFieldPassword.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAOpD;;;;GAIG;AACH;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,yBAAyB,qDAsHpE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as v, Fragment as L } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { InputAdornment as T } from "@mui/material";
|
|
3
3
|
import { useState as V } from "react";
|
|
4
4
|
import { useFormContext as j, Controller as A } from "react-hook-form";
|
|
@@ -7,97 +7,105 @@ import { BooleanPasswordViewOnOutlined as M, BooleanPasswordViewOffOutlined as k
|
|
|
7
7
|
import { RHFTextFieldPasswordRoot as D, LabelStyled as E, TextFieldStyled as q, IconButtonStyled as G } from "./slots/RHFTextFieldPasswordSlots.js";
|
|
8
8
|
import { HelperError as J } from "../../HelperError/HelperError.js";
|
|
9
9
|
import { getLimitCharacters as K } from "../../../utils/getLimitCharacters/getLimitCharacters.js";
|
|
10
|
-
const ee = (
|
|
10
|
+
const ee = (h) => {
|
|
11
11
|
const {
|
|
12
12
|
name: t,
|
|
13
13
|
label: m,
|
|
14
|
-
size:
|
|
14
|
+
size: a,
|
|
15
15
|
mandatory: g,
|
|
16
|
-
mandatoryMessage:
|
|
17
|
-
helperMessage:
|
|
18
|
-
disabled:
|
|
19
|
-
readOnly:
|
|
20
|
-
InputProps:
|
|
21
|
-
inputProps:
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
24
|
-
return /* @__PURE__ */ e(
|
|
25
|
-
|
|
16
|
+
mandatoryMessage: y,
|
|
17
|
+
helperMessage: S,
|
|
18
|
+
disabled: p,
|
|
19
|
+
readOnly: w = !1,
|
|
20
|
+
InputProps: s,
|
|
21
|
+
inputProps: u,
|
|
22
|
+
...l
|
|
23
|
+
} = h, [d, x] = V(!1), { currentSize: i } = H(a), b = i === "small" || i === "medium" ? i : "medium", { control: O } = j(), n = !!(w || s?.readOnly || u?.readOnly);
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
D,
|
|
26
26
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
...a,
|
|
70
|
-
readOnly: d,
|
|
71
|
-
/* InputAdornment: Material UI component used to add custom graphic content inside the text field. */
|
|
72
|
-
endAdornment: a?.endAdornment ?? /* @__PURE__ */ e(T, { position: "end", children: /* @__PURE__ */ e(
|
|
73
|
-
G,
|
|
74
|
-
{
|
|
75
|
-
ownerState: { error: !!o },
|
|
27
|
+
"data-rhf-field": t,
|
|
28
|
+
"data-rhf-disabled": !!p,
|
|
29
|
+
"data-rhf-readonly": n,
|
|
30
|
+
children: /* @__PURE__ */ e(
|
|
31
|
+
A,
|
|
32
|
+
{
|
|
33
|
+
name: t,
|
|
34
|
+
control: O,
|
|
35
|
+
render: ({ field: { onChange: P, value: F, ref: C }, fieldState: { error: o }, formState: { isSubmitting: z } }) => {
|
|
36
|
+
const r = p || z, f = d ? "text" : "password", B = (c) => {
|
|
37
|
+
if (n || r)
|
|
38
|
+
return;
|
|
39
|
+
const I = l.maxLength ? K({ limitCharacters: l.maxLength, value: c.target.value }) : c.target.value, R = String(I || "");
|
|
40
|
+
P(R);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ v(L, { children: [
|
|
43
|
+
m && /* @__PURE__ */ e(
|
|
44
|
+
E,
|
|
45
|
+
{
|
|
46
|
+
ownerState: { error: !!o },
|
|
47
|
+
size: b,
|
|
48
|
+
label: m,
|
|
49
|
+
htmlFor: t,
|
|
50
|
+
mandatory: g,
|
|
51
|
+
mandatoryMessage: y,
|
|
52
|
+
helperMessage: S
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
q,
|
|
57
|
+
{
|
|
58
|
+
ownerState: { error: !!o },
|
|
59
|
+
name: t,
|
|
60
|
+
id: t,
|
|
61
|
+
type: f,
|
|
62
|
+
size: a,
|
|
63
|
+
error: !!o,
|
|
64
|
+
disabled: r,
|
|
65
|
+
inputProps: {
|
|
66
|
+
role: "textbox",
|
|
67
|
+
"aria-label": t,
|
|
68
|
+
...u,
|
|
76
69
|
disabled: r,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
70
|
+
readOnly: n,
|
|
71
|
+
name: t,
|
|
72
|
+
type: f
|
|
73
|
+
},
|
|
74
|
+
InputProps: {
|
|
75
|
+
...s,
|
|
76
|
+
readOnly: n,
|
|
77
|
+
/* InputAdornment: Material UI component used to add custom graphic content inside the text field. */
|
|
78
|
+
endAdornment: s?.endAdornment ?? /* @__PURE__ */ e(T, { position: "end", children: /* @__PURE__ */ e(
|
|
79
|
+
G,
|
|
80
|
+
{
|
|
81
|
+
ownerState: { error: !!o },
|
|
82
|
+
disabled: r,
|
|
83
|
+
onClick: () => {
|
|
84
|
+
r || x(!d);
|
|
85
|
+
},
|
|
86
|
+
icon: d ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(k, {})
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
},
|
|
90
|
+
onChange: B,
|
|
91
|
+
value: String(F || ""),
|
|
92
|
+
inputRef: C,
|
|
93
|
+
...l
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
o?.message && /* @__PURE__ */ e(
|
|
97
|
+
J,
|
|
98
|
+
{
|
|
99
|
+
message: o.message,
|
|
100
|
+
size: a
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
)
|
|
99
107
|
}
|
|
100
|
-
)
|
|
108
|
+
);
|
|
101
109
|
};
|
|
102
110
|
export {
|
|
103
111
|
ee as RHFTextFieldPassword
|
package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { UploadMultiFileProps } from '../../types';
|
|
|
2
2
|
/**
|
|
3
3
|
* todo: document this component
|
|
4
4
|
*/
|
|
5
|
-
export default function UploadMultiFile({ error, showPreview, files, onRemove, onRemoveAll, helperText, sx, ...other }: UploadMultiFileProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default function UploadMultiFile({ error, showPreview, files, onRemove, onRemoveAll, helperText, sx, rhfFieldName, ...other }: UploadMultiFileProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAenD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,KAAK,EACL,WAAmB,EACnB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,EAAE,EACF,GAAG,KAAK,EACT,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/hook-form/RHFUpload/RHFUploaMultipleFile/components/UploadMultiple/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAenD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,KAAK,EACL,WAAmB,EACnB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,UAAU,EACV,EAAE,EACF,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,oBAAoB,oDAiCtB"}
|