@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AutocompleteProps } from '../../types';
|
|
2
|
+
/** Synthetic options shared by the local and async keyboard fixtures.
|
|
3
|
+
* Opciones sintéticas compartidas por los fixtures de teclado local y asíncrono. */
|
|
4
|
+
export interface AutocompleteKeyboardOption {
|
|
5
|
+
id: number;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
/** Public states that must retain their existing independent action contracts.
|
|
9
|
+
* Estados públicos que deben conservar sus contratos de acciones independientes. */
|
|
10
|
+
export interface AutocompleteKeyboardFixtureProps {
|
|
11
|
+
mode: 'local' | 'async';
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
onChange?: AutocompleteProps<AutocompleteKeyboardOption, boolean>['onChange'];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/extended/mui/Autocomplete/tests/keyboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;oFACoF;AACpF,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;oFACoF;AACpF,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;CAC/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Select/Select.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiI,MAAM,OAAO,CAAC;AActJ,OAAO,EAAoB,WAAW,EAAgB,MAAM,SAAS,CAAC;AAStE;;;;GAIG;AAEH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Select/Select.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAiI,MAAM,OAAO,CAAC;AActJ,OAAO,EAAoB,WAAW,EAAgB,MAAM,SAAS,CAAC;AAStE;;;;GAIG;AAEH,eAAO,MAAM,MAAM,uIA2Yf,CAAC"}
|
|
@@ -1,156 +1,161 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import { useModuleSkeleton as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useForkRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useComponentSize as
|
|
8
|
-
import { ArrowDownStyled as
|
|
9
|
-
import { SELECT_KEY_COMPONENT as
|
|
1
|
+
import { jsx as u, jsxs as ie } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useModuleSkeleton as ae, useModuleDictionary as le } from "@m4l/core";
|
|
3
|
+
import { useTheme as ue } from "@mui/material";
|
|
4
|
+
import { useForkRef as fe } from "@mui/material/utils";
|
|
5
|
+
import me from "clsx";
|
|
6
|
+
import B, { forwardRef as de, useMemo as A, useState as Se, useRef as O, useCallback as m, useEffect as W } from "react";
|
|
7
|
+
import { useComponentSize as Ae } from "../../../../hooks/useComponentSize/index.js";
|
|
8
|
+
import { ArrowDownStyled as ye, AdormentStyled as we, SelectRootStyled as he, SkeletonSelectStyled as Ce, MenuItemListStyled as ge, MenuItemNoOptionStyled as pe, LabelPlaceholerStyled as Ie, RenderValueContainerStyled as j, RenderValueTypography as ve } from "./slots/SelectSlots.js";
|
|
9
|
+
import { SELECT_KEY_COMPONENT as K, ICON_ARROW_DOWN as Me, SELECT_CLASSES as d } from "./constants.js";
|
|
10
10
|
import { SELECT_DICTIONARY as Re } from "./dictionary.js";
|
|
11
|
-
import { getPropDataTestId as
|
|
12
|
-
import { selectStyles as
|
|
13
|
-
import { usePopoverContainer as
|
|
14
|
-
import { Clipboard as
|
|
11
|
+
import { getPropDataTestId as xe } from "../../../../test/getNameDataTestId.js";
|
|
12
|
+
import { selectStyles as b } from "./Select.styles.js";
|
|
13
|
+
import { usePopoverContainer as De } from "../../../../hooks/usePopoverContainer/usePopoverContainer.js";
|
|
14
|
+
import { Clipboard as Ne } from "../Clipboard/Clipboard.js";
|
|
15
15
|
import { Chip as ze } from "../../../Chip/Chip.js";
|
|
16
16
|
import { isIconComponentElement as Ee } from "../../../../helpers/isIconComponentElement/isIconComponentElement.js";
|
|
17
17
|
import { SelectSlots as Le } from "./slots/SelectEnum.js";
|
|
18
|
-
const Ue =
|
|
18
|
+
const Ue = de(
|
|
19
19
|
function({
|
|
20
|
-
value:
|
|
20
|
+
value: x = null,
|
|
21
21
|
options: i = [],
|
|
22
22
|
multiple: s,
|
|
23
23
|
onChange: y,
|
|
24
|
-
size:
|
|
24
|
+
size: q = "medium",
|
|
25
25
|
disabled: t = !1,
|
|
26
|
-
error:
|
|
27
|
-
variant:
|
|
28
|
-
placeholder:
|
|
29
|
-
className:
|
|
26
|
+
error: p = !1,
|
|
27
|
+
variant: I = "outlined",
|
|
28
|
+
placeholder: F,
|
|
29
|
+
className: Y,
|
|
30
30
|
dataTestId: H,
|
|
31
31
|
readOnly: n = !1,
|
|
32
32
|
MenuProps: a,
|
|
33
|
-
...
|
|
33
|
+
...D
|
|
34
34
|
}, $) {
|
|
35
|
-
const { currentSize: v } =
|
|
35
|
+
const { currentSize: v } = Ae(q), G = ae(), { getLabel: J } = le(), c = v === "small" || v === "medium" ? v : "medium", N = Me, o = A(() => x, [x]), w = !!(n && !s), h = !!(n && s), [f, C] = Se(!1), g = O(null), z = O(null), E = ue(), S = A(() => ({
|
|
36
36
|
size: c,
|
|
37
37
|
disabled: t,
|
|
38
|
-
error:
|
|
39
|
-
variant:
|
|
38
|
+
error: p,
|
|
39
|
+
variant: I,
|
|
40
40
|
multiple: s,
|
|
41
41
|
readOnly: n
|
|
42
|
-
}), [c, t,
|
|
43
|
-
const e = typeof
|
|
42
|
+
}), [c, t, p, I, s, n]), L = De(g.current), T = f ? (g.current?.offsetWidth ?? 0) + 1 : void 0, k = A(() => !w || o === null || o === void 0 || Array.isArray(o) ? "" : i.find((r) => String(r.id) === String(o))?.label ?? "", [w, i, o]), V = A(() => {
|
|
43
|
+
const e = typeof b?.menuPaper == "function" ? b.menuPaper({ theme: E, menuPaperMinWidth: T }) : {};
|
|
44
44
|
return Array.isArray(a?.sx) ? [e, ...a.sx] : a?.sx ? [e, a.sx] : e;
|
|
45
|
-
}, [T, a?.sx,
|
|
45
|
+
}, [T, a?.sx, E]), Q = A(() => ({
|
|
46
46
|
...a,
|
|
47
47
|
anchorOrigin: a?.anchorOrigin ?? {
|
|
48
48
|
vertical: "bottom",
|
|
49
49
|
horizontal: "left"
|
|
50
50
|
},
|
|
51
|
-
container: a?.container ??
|
|
51
|
+
container: a?.container ?? L ?? void 0,
|
|
52
52
|
disableScrollLock: a?.disableScrollLock ?? !0,
|
|
53
53
|
sx: V,
|
|
54
54
|
transformOrigin: a?.transformOrigin ?? {
|
|
55
55
|
vertical: "top",
|
|
56
56
|
horizontal: "left"
|
|
57
57
|
}
|
|
58
|
-
}), [
|
|
58
|
+
}), [L, a, V]), U = m((e) => {
|
|
59
59
|
if (n || t)
|
|
60
60
|
return;
|
|
61
61
|
const r = e.target.value;
|
|
62
62
|
if (y)
|
|
63
63
|
if (s) {
|
|
64
64
|
if (Array.isArray(r)) {
|
|
65
|
-
const l = i.filter((
|
|
65
|
+
const l = i.filter((R) => r.includes(R.id));
|
|
66
66
|
y(l);
|
|
67
67
|
}
|
|
68
68
|
} else {
|
|
69
|
-
const l = i.find((
|
|
69
|
+
const l = i.find((R) => R.id === r);
|
|
70
70
|
l && y(l);
|
|
71
71
|
}
|
|
72
|
-
}, [s, y, i, n, t]), X =
|
|
72
|
+
}, [s, y, i, n, t]), X = m((e) => {
|
|
73
73
|
if (!(n || t) && s && Array.isArray(o)) {
|
|
74
74
|
const r = i.filter((l) => l.id !== e.id && o.includes(l.id));
|
|
75
75
|
y?.(r);
|
|
76
76
|
}
|
|
77
|
-
}, [s, o, y, i, n, t]),
|
|
77
|
+
}, [s, o, y, i, n, t]), M = m(() => {
|
|
78
78
|
if (!(t || n)) {
|
|
79
79
|
if (s) {
|
|
80
|
-
f ||
|
|
80
|
+
f || C(!0);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
C(!f);
|
|
84
84
|
}
|
|
85
|
-
}, [t, n, s, f]),
|
|
86
|
-
|
|
85
|
+
}, [t, n, s, f]), _ = m((e) => {
|
|
86
|
+
e.button === 0 && (e.preventDefault(), g.current?.querySelector('[role="combobox"]')?.focus());
|
|
87
|
+
}, []), Z = A(() => () => w ? /* @__PURE__ */ u(
|
|
88
|
+
Ne,
|
|
87
89
|
{
|
|
88
90
|
ariaLabel: "Copy value",
|
|
89
|
-
dataTestId: `${
|
|
91
|
+
dataTestId: `${K}-copy`,
|
|
90
92
|
disabled: t,
|
|
91
93
|
size: c,
|
|
92
94
|
value: k
|
|
93
95
|
}
|
|
94
|
-
) :
|
|
95
|
-
|
|
96
|
+
) : h ? null : /* @__PURE__ */ u(
|
|
97
|
+
ye,
|
|
96
98
|
{
|
|
97
|
-
ownerState: { ...
|
|
98
|
-
icon:
|
|
99
|
+
ownerState: { ...S },
|
|
100
|
+
icon: N,
|
|
99
101
|
disabled: t || n,
|
|
100
102
|
size: c,
|
|
101
|
-
|
|
103
|
+
tabIndex: -1,
|
|
104
|
+
onMouseDown: _,
|
|
105
|
+
onClick: M,
|
|
102
106
|
rotationAngle: f ? 180 : 0
|
|
103
107
|
}
|
|
104
108
|
), [
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
S,
|
|
110
|
+
N,
|
|
107
111
|
t,
|
|
108
112
|
n,
|
|
109
113
|
c,
|
|
110
114
|
f,
|
|
111
|
-
|
|
115
|
+
M,
|
|
116
|
+
_,
|
|
117
|
+
w,
|
|
112
118
|
h,
|
|
113
|
-
C,
|
|
114
119
|
k
|
|
115
|
-
]),
|
|
116
|
-
|
|
120
|
+
]), P = m((e) => e ? typeof e == "string" ? /* @__PURE__ */ u(
|
|
121
|
+
we,
|
|
117
122
|
{
|
|
118
123
|
src: e,
|
|
119
124
|
size: c,
|
|
120
|
-
className:
|
|
125
|
+
className: d.adorment,
|
|
121
126
|
disabled: t
|
|
122
127
|
}
|
|
123
|
-
) :
|
|
128
|
+
) : B.isValidElement(e) ? Ee(e) ? B.cloneElement(e, {
|
|
124
129
|
size: c,
|
|
125
130
|
disabled: t
|
|
126
|
-
}) : e : null : null, [t, c]),
|
|
131
|
+
}) : e : null : null, [t, c]), ee = m((e) => {
|
|
127
132
|
e.stopPropagation();
|
|
128
|
-
}, []),
|
|
133
|
+
}, []), te = m((e) => {
|
|
129
134
|
e.stopPropagation();
|
|
130
|
-
}, []),
|
|
135
|
+
}, []), re = () => {
|
|
131
136
|
if (o == null || s && Array.isArray(o) && o.length === 0)
|
|
132
|
-
return /* @__PURE__ */ u(
|
|
137
|
+
return /* @__PURE__ */ u(Ie, { ownerState: { disabled: t, readOnly: n }, variant: "bodyStandard", color: "text.disabled", children: F });
|
|
133
138
|
if (s) {
|
|
134
139
|
if (!Array.isArray(o))
|
|
135
140
|
return null;
|
|
136
141
|
const e = o.map((r) => i.find((l) => l.id === r));
|
|
137
142
|
return /* @__PURE__ */ u(
|
|
138
|
-
|
|
143
|
+
j,
|
|
139
144
|
{
|
|
140
|
-
ref:
|
|
141
|
-
ownerState: { ...
|
|
142
|
-
className:
|
|
145
|
+
ref: z,
|
|
146
|
+
ownerState: { ...S },
|
|
147
|
+
className: d.renderValueContainer,
|
|
143
148
|
children: e.map((r) => r ? /* @__PURE__ */ u(
|
|
144
149
|
ze,
|
|
145
150
|
{
|
|
146
151
|
size: c,
|
|
147
152
|
label: r.label,
|
|
148
|
-
description:
|
|
149
|
-
startIcon:
|
|
150
|
-
endIcon:
|
|
153
|
+
description: h ? void 0 : r.description,
|
|
154
|
+
startIcon: h ? void 0 : r.selectedStartAdornment ?? r.startAdornment,
|
|
155
|
+
endIcon: h ? void 0 : r.endAdornment,
|
|
151
156
|
opacity: !0,
|
|
152
157
|
onDeleted: n || t ? void 0 : () => X(r),
|
|
153
|
-
iconButtonProps: { onMouseDown:
|
|
158
|
+
iconButtonProps: { onMouseDown: ee, onKeyDown: te }
|
|
154
159
|
},
|
|
155
160
|
r.id
|
|
156
161
|
) : null)
|
|
@@ -158,51 +163,51 @@ const Ue = me(
|
|
|
158
163
|
);
|
|
159
164
|
} else {
|
|
160
165
|
const e = i.find((r) => String(r.id) === String(o));
|
|
161
|
-
return e ? /* @__PURE__ */
|
|
162
|
-
!
|
|
163
|
-
/* @__PURE__ */ u(ve, { ownerState: { disabled: t, readOnly: n }, variant: "bodyStandard", color: "text.primary", size: c, className:
|
|
166
|
+
return e ? /* @__PURE__ */ ie(j, { ownerState: { ...S }, className: d.renderValueContainer, children: [
|
|
167
|
+
!w && (e.selectedStartAdornment ?? e.startAdornment) && P(e.selectedStartAdornment ?? e.startAdornment),
|
|
168
|
+
/* @__PURE__ */ u(ve, { ownerState: { disabled: t, readOnly: n }, variant: "bodyStandard", color: "text.primary", size: c, className: d.renderValueTypography, children: e.label })
|
|
164
169
|
] }) : "";
|
|
165
170
|
}
|
|
166
|
-
},
|
|
167
|
-
t || n ||
|
|
168
|
-
}, [t, n]),
|
|
169
|
-
|
|
171
|
+
}, ne = m(() => {
|
|
172
|
+
t || n || C(!0);
|
|
173
|
+
}, [t, n]), oe = m(() => {
|
|
174
|
+
C(!1);
|
|
170
175
|
}, []);
|
|
171
|
-
|
|
176
|
+
W(() => {
|
|
172
177
|
if (!s || !Array.isArray(o))
|
|
173
178
|
return;
|
|
174
|
-
const e =
|
|
179
|
+
const e = z.current;
|
|
175
180
|
e && requestAnimationFrame(() => {
|
|
176
181
|
e.scrollTop = e.scrollHeight;
|
|
177
182
|
});
|
|
178
|
-
}, [s, o]),
|
|
179
|
-
(t || n) && f &&
|
|
183
|
+
}, [s, o]), W(() => {
|
|
184
|
+
(t || n) && f && C(!1);
|
|
180
185
|
}, [t, n, f]);
|
|
181
|
-
const
|
|
182
|
-
return G ? /* @__PURE__ */ u(Ce, { ownerState: { ...
|
|
183
|
-
|
|
186
|
+
const se = A(() => he(), []), ce = fe(g, $);
|
|
187
|
+
return G ? /* @__PURE__ */ u(Ce, { ownerState: { ...S }, className: d.skeletonSelect }) : /* @__PURE__ */ u(
|
|
188
|
+
se,
|
|
184
189
|
{
|
|
185
|
-
...
|
|
186
|
-
...
|
|
187
|
-
ref:
|
|
188
|
-
className:
|
|
189
|
-
ownerState: { ...
|
|
190
|
+
...D,
|
|
191
|
+
...xe(K, Le.root, H),
|
|
192
|
+
ref: ce,
|
|
193
|
+
className: me(d.root, d[I], Y),
|
|
194
|
+
ownerState: { ...S },
|
|
190
195
|
IconComponent: Z,
|
|
191
196
|
multiple: s,
|
|
192
197
|
value: o ?? (s ? [] : ""),
|
|
193
198
|
onChange: U,
|
|
194
199
|
fullWidth: !0,
|
|
195
200
|
disabled: t,
|
|
196
|
-
error:
|
|
197
|
-
renderValue:
|
|
201
|
+
error: p,
|
|
202
|
+
renderValue: re,
|
|
198
203
|
open: t || n ? !1 : f,
|
|
199
204
|
native: !1,
|
|
200
|
-
onOpen:
|
|
201
|
-
onClose:
|
|
202
|
-
onClick:
|
|
205
|
+
onOpen: ne,
|
|
206
|
+
onClose: oe,
|
|
207
|
+
onClick: M,
|
|
203
208
|
displayEmpty: !0,
|
|
204
209
|
inputProps: {
|
|
205
|
-
...
|
|
210
|
+
...D.inputProps,
|
|
206
211
|
readOnly: n
|
|
207
212
|
},
|
|
208
213
|
MenuProps: Q,
|
|
@@ -210,10 +215,10 @@ const Ue = me(
|
|
|
210
215
|
(e) => {
|
|
211
216
|
const r = s ? Array.isArray(o) && o.some((l) => l === e.id) : o === e.id;
|
|
212
217
|
return /* @__PURE__ */ u(
|
|
213
|
-
|
|
218
|
+
ge,
|
|
214
219
|
{
|
|
215
|
-
className:
|
|
216
|
-
ownerState: { ...
|
|
220
|
+
className: d.menuItem,
|
|
221
|
+
ownerState: { ...S },
|
|
217
222
|
size: c,
|
|
218
223
|
value: e.id,
|
|
219
224
|
disabled: t,
|
|
@@ -227,10 +232,10 @@ const Ue = me(
|
|
|
227
232
|
);
|
|
228
233
|
}
|
|
229
234
|
) : /* @__PURE__ */ u(
|
|
230
|
-
|
|
235
|
+
pe,
|
|
231
236
|
{
|
|
232
|
-
ownerState: { ...
|
|
233
|
-
className:
|
|
237
|
+
ownerState: { ...S },
|
|
238
|
+
className: d.menuItemNoOptions,
|
|
234
239
|
size: c,
|
|
235
240
|
label: J(Re.noOptions),
|
|
236
241
|
disabled: !0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Select/Select.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/mui/Select/Select.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,eAAO,MAAM,YAAY,EAAE,YA6T1B,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SELECT_CLASSES as
|
|
2
|
-
import { getSharedInputStateColors as
|
|
3
|
-
import { getSingleLineInputLineHeight as
|
|
4
|
-
import { ICON_BUTTON_CLASSES as
|
|
5
|
-
import { getSizeStyles as
|
|
6
|
-
import { getInputAlignmentIconButtonOverrides as
|
|
7
|
-
const
|
|
1
|
+
import { SELECT_CLASSES as a } from "./constants.js";
|
|
2
|
+
import { getSharedInputStateColors as u } from "../../../../utils/getSharedInputStateColors.js";
|
|
3
|
+
import { getSingleLineInputLineHeight as n } from "../../../../utils/getTypographyStyles.js";
|
|
4
|
+
import { ICON_BUTTON_CLASSES as d } from "../IconButton/constants.js";
|
|
5
|
+
import { getSizeStyles as s, getHeightSizeStyles as c } from "../../../../utils/getSizeStyles/getSizeStyles.js";
|
|
6
|
+
import { getInputAlignmentIconButtonOverrides as l } from "../../../../utils/getInputAlignmentIconButtonOverrides/getInputAlignmentIconButtonOverrides.js";
|
|
7
|
+
const y = {
|
|
8
8
|
/**
|
|
9
9
|
* Styles for the Select component.
|
|
10
10
|
*/
|
|
11
11
|
root: ({ theme: r, ownerState: e }) => {
|
|
12
|
-
const o =
|
|
12
|
+
const o = u(r, !!e?.error), t = e?.error ? r.vars.palette.error.semanticText : r.vars.palette.primary.semanticText, p = l(r, e?.size)["&&&"];
|
|
13
13
|
return {
|
|
14
|
-
[`&.${
|
|
14
|
+
[`&.${a.root}`]: {
|
|
15
15
|
width: "100%",
|
|
16
16
|
borderRadius: r.vars.size.borderRadius["r1-5"],
|
|
17
17
|
border: r.vars.size.borderStroke.actionInput,
|
|
@@ -35,11 +35,11 @@ const x = {
|
|
|
35
35
|
height: "auto",
|
|
36
36
|
marginLeft: 0
|
|
37
37
|
},
|
|
38
|
-
[`& .MuiInputAdornment-positionEnd .${
|
|
38
|
+
[`& .MuiInputAdornment-positionEnd .${d.styledMUIIconButton}`]: {
|
|
39
39
|
borderRadius: 0
|
|
40
40
|
},
|
|
41
|
-
[`& .MuiInputAdornment-root .${
|
|
42
|
-
...
|
|
41
|
+
[`& .MuiInputAdornment-root .${d.styledMUIIconButton}`]: {
|
|
42
|
+
...p
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"&&& .MuiInputBase-input": {
|
|
@@ -55,27 +55,14 @@ const x = {
|
|
|
55
55
|
all: "unset",
|
|
56
56
|
display: "none"
|
|
57
57
|
},
|
|
58
|
-
...!e?.readOnly && {
|
|
59
|
-
'&&&:has(.MuiSelect-select[aria-expanded="true"])': {
|
|
60
|
-
...(e?.variant === "contained" || e?.variant === "outlined") && {
|
|
61
|
-
border: `1px solid ${o.focusBorderColor}`
|
|
62
|
-
},
|
|
63
|
-
...e?.variant === "text" ? {
|
|
64
|
-
boxShadow: `0px 1.5px 0px 0px ${o.focusRingColor} !important`,
|
|
65
|
-
borderBottom: `1px solid ${o.focusBorderColor}`
|
|
66
|
-
} : {
|
|
67
|
-
boxShadow: `0px 0px 0px 1.5px ${o.focusRingColor} !important`
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
58
|
"& .M4LImage-root": {
|
|
72
|
-
...
|
|
59
|
+
...c(
|
|
73
60
|
r.generalSettings.isMobile,
|
|
74
61
|
e?.size || "medium",
|
|
75
62
|
"base",
|
|
76
|
-
(
|
|
77
|
-
height:
|
|
78
|
-
width:
|
|
63
|
+
(i) => ({
|
|
64
|
+
height: i,
|
|
65
|
+
width: i
|
|
79
66
|
})
|
|
80
67
|
)
|
|
81
68
|
},
|
|
@@ -109,14 +96,14 @@ const x = {
|
|
|
109
96
|
}
|
|
110
97
|
},
|
|
111
98
|
// Text variant styles
|
|
112
|
-
[`&&&.${
|
|
99
|
+
[`&&&.${a.text}`]: {
|
|
113
100
|
borderTop: 0,
|
|
114
101
|
borderRight: 0,
|
|
115
102
|
borderLeft: 0,
|
|
116
103
|
borderRadius: "unset"
|
|
117
104
|
},
|
|
118
105
|
// Contained variant styles
|
|
119
|
-
[`&&&.${
|
|
106
|
+
[`&&&.${a.contained}`]: {
|
|
120
107
|
backgroundColor: e?.error ? r.vars.palette.error.enabledOpacity : r.vars.palette.default.enabledOpacity,
|
|
121
108
|
borderColor: e?.readOnly ? `${r.vars.palette.border.secondary}!important` : "transparent",
|
|
122
109
|
...!e?.readOnly && !e?.disabled && {
|
|
@@ -135,16 +122,38 @@ const x = {
|
|
|
135
122
|
borderColor: o.hoverBorderColor
|
|
136
123
|
}
|
|
137
124
|
},
|
|
125
|
+
// Keep focus visible when closed; this rule follows variant/hover overrides.
|
|
126
|
+
// Mantén visible el foco estando cerrado; esta regla sigue a las variantes/hover.
|
|
127
|
+
...!e?.disabled && {
|
|
128
|
+
'&&&.Mui-focused, &&&:has(.MuiSelect-select[aria-expanded="true"])': {
|
|
129
|
+
...!e?.readOnly && (e?.variant === "contained" || e?.variant === "outlined") && {
|
|
130
|
+
border: `1px solid ${t}`
|
|
131
|
+
},
|
|
132
|
+
...e?.variant === "text" ? {
|
|
133
|
+
boxShadow: `0px 1.5px 0px 0px ${o.focusRingColor} !important`,
|
|
134
|
+
...!e?.readOnly && {
|
|
135
|
+
borderBottom: `1px solid ${t}`
|
|
136
|
+
}
|
|
137
|
+
} : {
|
|
138
|
+
boxShadow: `0px 0px 0px 1.5px ${o.focusRingColor} !important`
|
|
139
|
+
},
|
|
140
|
+
// A readonly border stays neutral, so give keyboard focus a solid outline too.
|
|
141
|
+
// El borde de solo lectura sigue neutro; el contorno sólido identifica el foco.
|
|
142
|
+
...e?.readOnly && {
|
|
143
|
+
outline: `${r.vars.size.borderStroke.actionInput} ${t}`
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
138
147
|
'&[aria-hidden="true"]': {
|
|
139
148
|
pointerEvents: "none"
|
|
140
149
|
},
|
|
141
150
|
// Component size
|
|
142
|
-
...
|
|
151
|
+
...s(
|
|
143
152
|
r,
|
|
144
153
|
e?.size || "medium",
|
|
145
154
|
"action",
|
|
146
|
-
(
|
|
147
|
-
minHeight:
|
|
155
|
+
(i) => ({
|
|
156
|
+
minHeight: i,
|
|
148
157
|
height: "fit-content",
|
|
149
158
|
maxHeight: "80px"
|
|
150
159
|
})
|
|
@@ -174,14 +183,14 @@ const x = {
|
|
|
174
183
|
}
|
|
175
184
|
}),
|
|
176
185
|
arrowDown: ({ theme: r, ownerState: e }) => ({
|
|
177
|
-
...
|
|
186
|
+
...l(r, e?.size)
|
|
178
187
|
}),
|
|
179
188
|
/**
|
|
180
189
|
* Styles for the render value typography
|
|
181
190
|
*/
|
|
182
191
|
renderValueTypography: ({ ownerState: r }) => ({
|
|
183
192
|
cursor: r?.readOnly || r?.disabled ? "default" : "pointer",
|
|
184
|
-
...!r?.multiple &&
|
|
193
|
+
...!r?.multiple && n()
|
|
185
194
|
}),
|
|
186
195
|
// chip: () => ({
|
|
187
196
|
// }),
|
|
@@ -200,7 +209,7 @@ const x = {
|
|
|
200
209
|
paddingLeft: r.vars.size.baseSpacings.sp1,
|
|
201
210
|
paddingRight: r.vars.size.baseSpacings.sp3,
|
|
202
211
|
cursor: e?.readOnly || e?.disabled ? "default" : "pointer",
|
|
203
|
-
...!e?.multiple &&
|
|
212
|
+
...!e?.multiple && n()
|
|
204
213
|
}),
|
|
205
214
|
/**
|
|
206
215
|
* Styles for the menu item select
|
|
@@ -276,7 +285,7 @@ const x = {
|
|
|
276
285
|
alignItems: "center",
|
|
277
286
|
background: r.vars.palette.skeleton.default,
|
|
278
287
|
// Estilos específicos para el tamaño small
|
|
279
|
-
...
|
|
288
|
+
...s(
|
|
280
289
|
r,
|
|
281
290
|
e?.size || "medium",
|
|
282
291
|
"action",
|
|
@@ -287,5 +296,5 @@ const x = {
|
|
|
287
296
|
})
|
|
288
297
|
};
|
|
289
298
|
export {
|
|
290
|
-
|
|
299
|
+
y as selectStyles
|
|
291
300
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SelectKeyboardFixtureProps } from './types';
|
|
2
|
+
/** Render the actual Select between controls that expose forward and reverse tab order. */
|
|
3
|
+
export declare function SelectKeyboardFixture({ readOnly, disabled, onChange }: SelectKeyboardFixtureProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=SelectKeyboardFixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectKeyboardFixture.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/extended/mui/Select/tests/keyboard/SelectKeyboardFixture.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAA0B,EAAE,EAAE,0BAA0B,oDAQnH"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectProps } from '../../types';
|
|
2
|
+
/** Public Select states surrounded by independent keyboard destinations. */
|
|
3
|
+
export interface SelectKeyboardFixtureProps extends Pick<SelectProps<string>, 'readOnly' | 'disabled'> {
|
|
4
|
+
onChange?: SelectProps<string | number, boolean>['onChange'];
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/components/src/components/extended/mui/Select/tests/keyboard/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACpG,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;CAC9D"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DistanceToNowFormatterProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Tiene 3 tipos de presentaciones:
|
|
7
|
-
* En tiempo pasado
|
|
8
|
-
* En tiempo presente
|
|
9
|
-
* En tiempo futuro
|
|
4
|
+
* Display elapsed time with a configurable refresh delay and past, present or future wording.
|
|
5
|
+
* Short presentation retains the full wording for hover and assistive technology.
|
|
10
6
|
*
|
|
11
7
|
*/
|
|
12
8
|
export declare function DistanceToNowFormatter<T extends React.ElementType>(props: DistanceToNowFormatterProps<T>): string | import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DistanceToNowFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EAAG,2BAA2B,EAAE,MAAM,SAAS,CAAC;AASvD
|
|
1
|
+
{"version":3,"file":"DistanceToNowFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EAAG,2BAA2B,EAAE,MAAM,SAAS,CAAC;AASvD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAE,CAAC,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,6DAiBzG"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { RootStyled as
|
|
5
|
-
import { getPropDataTestId as
|
|
6
|
-
import { COMPONET_KEY_COMPONENT as
|
|
7
|
-
import { DistanceToNowFormatterSlots as
|
|
8
|
-
import { useDistanceToNowFormatter as
|
|
9
|
-
import { getComponentSlotRoot as
|
|
10
|
-
function
|
|
11
|
-
const { presentationTime:
|
|
12
|
-
return o ===
|
|
1
|
+
import { jsx as f } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import T from "react";
|
|
3
|
+
import N from "clsx";
|
|
4
|
+
import { RootStyled as d } from "./slots/DistanceToNowFormatterSlots.js";
|
|
5
|
+
import { getPropDataTestId as g } from "../../../test/getNameDataTestId.js";
|
|
6
|
+
import { COMPONET_KEY_COMPONENT as m } from "./constants.js";
|
|
7
|
+
import { DistanceToNowFormatterSlots as u } from "./slots/slots.js";
|
|
8
|
+
import { useDistanceToNowFormatter as C } from "./hooks/useDistanceToNowFormatter.js";
|
|
9
|
+
import { getComponentSlotRoot as D } from "../../../utils/getComponentSlotRoot.js";
|
|
10
|
+
function y(a) {
|
|
11
|
+
const { presentationTime: n = "present", date: i, dataTestId: s, delay: p, className: l, Component: o = d, componentProps: c, format: t = "long" } = a, { time: r, longTime: e } = C({ presentationTime: n, date: i, delay: p, format: t });
|
|
12
|
+
return o === T.Fragment ? r : /* @__PURE__ */ f(
|
|
13
13
|
o,
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...
|
|
18
|
-
|
|
15
|
+
...t === "short" ? { title: e, "aria-label": e } : {},
|
|
16
|
+
className: N(D(m), l),
|
|
17
|
+
...g(m, u.root, s),
|
|
18
|
+
...c,
|
|
19
|
+
children: r
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
}
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
+
y as DistanceToNowFormatter
|
|
24
25
|
};
|