@m4l/components 9.2.11 → 9.2.12

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.
Files changed (50) hide show
  1. package/components/DynamicFilter/DynamicFIlter.styles.js +123 -222
  2. package/components/DynamicFilter/slots/SlotsEnum.d.ts +3 -14
  3. package/components/DynamicFilter/slots/SlotsEnum.js +2 -13
  4. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +5 -38
  5. package/components/DynamicFilter/slots/dynamicFilterSlots.js +27 -80
  6. package/components/DynamicFilter/store/DynamicFilterContext.js +17 -2
  7. package/components/DynamicFilter/store/DynamicFilterStore.js +12 -1
  8. package/components/DynamicFilter/store/types.d.ts +10 -1
  9. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +1 -1
  10. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.js +17 -21
  11. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +0 -1
  12. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.js +1 -4
  13. package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.js +2 -3
  14. package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.d.ts +1 -0
  15. package/components/DynamicFilter/subcomponents/DynamicFilterBase/useDynamicFilterBase.js +2 -1
  16. package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +1 -1
  17. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts +1 -1
  18. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +8 -9
  19. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +0 -1
  20. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +1 -5
  21. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts +1 -1
  22. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +31 -23
  23. package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts +8 -0
  24. package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.js +10 -1
  25. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +12 -7
  26. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +6 -3
  27. package/components/DynamicFilter/tests/DynamicFilter.test.d.ts +1 -0
  28. package/components/DynamicFilter/tests/constants.d.ts +9 -0
  29. package/components/DynamicFilter/types.d.ts +9 -0
  30. package/components/DynamicSort/DynamicSort.styles.js +61 -112
  31. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -14
  32. package/components/DynamicSort/slots/DynamicSortSlots.js +17 -40
  33. package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -5
  34. package/components/DynamicSort/slots/SlotsEnum.js +1 -5
  35. package/components/DynamicSort/slots/tests/DynamicSort.test.d.ts +1 -0
  36. package/components/DynamicSort/store/DynamicSortContext.js +5 -2
  37. package/components/DynamicSort/subcomponents/AppliedSortChip/AppliedSortChip.js +2 -3
  38. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +2 -3
  39. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +5 -4
  40. package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +6 -5
  41. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +11 -8
  42. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +1 -1
  43. package/package.json +1 -1
  44. package/storybook/components/DynamicFilter/mocks/mocksData.d.ts +1 -0
  45. package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton.d.ts +0 -5
  46. package/components/DynamicFilter/subcomponents/FilterActions/FilterActionsSkeleton.js +0 -12
  47. package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton.d.ts +0 -5
  48. package/components/DynamicFilter/subcomponents/InputFilter/InputFilterSkeleton.js +0 -19
  49. package/utils/containerQuery.js +0 -6
  50. /package/components/DynamicFilter/{__tests__/DynamicFilter.test.d.ts → store/tests/DynamicFilterStore.test.d.ts} +0 -0
@@ -9,17 +9,14 @@ const ASSETS = {
9
9
  function useFilterActions() {
10
10
  const { host_static_assets, environment_assets } = useEnvironment();
11
11
  const automatic = useDynamicFilterStore((state) => state.automatic);
12
- const isSkeleton = useDynamicFilterStore((state) => state.ownerState.isSkeleton);
13
12
  const isValid = useDynamicFilterStore((state) => state.ownerState.isValid);
14
13
  const isDirty = useDynamicFilterStore((state) => state.ownerState.isDirty);
15
14
  const appliedFilters = useDynamicFilterStore((state) => state.appliedFilters);
16
- const { hidePopoverFilter, clearFilters, fireOnChangeFilters } = useDynamicFilterStore(
15
+ const { clearFilters, fireOnChangeFilters } = useDynamicFilterStore(
17
16
  (state) => state.actions
18
17
  );
19
18
  function onClickClearFilters() {
20
- hidePopoverFilter(false);
21
19
  clearFilters();
22
- fireOnChangeFilters();
23
20
  }
24
21
  const filterIconUrl = `${host_static_assets}/${environment_assets}/${ASSETS_URL}/${automatic ? ASSETS.refresh : ASSETS.search}`;
25
22
  const clearIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/close.svg`;
@@ -28,7 +25,6 @@ function useFilterActions() {
28
25
  isValid ? isDirty ? DICCTIONARY.filter_tooltip_dirty : DICCTIONARY.filter_tooltip_refresh : DICCTIONARY.filter_tooltip_invalid
29
26
  );
30
27
  return {
31
- isSkeleton,
32
28
  filterIconUrl,
33
29
  clearIconUrl,
34
30
  canShowRemoveAction,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * inputFilter: Componente encargado de mostrar el input de búsqueda y el menú de campos para filtrar
3
3
  */
4
4
  declare const InputFilter: () => import("react/jsx-runtime").JSX.Element | null;
5
5
  export default InputFilter;
@@ -1,8 +1,9 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { u as useInputFilter } from "./useInputFilter.js";
3
- import { I as InputFilterSkeleton } from "./InputFilterSkeleton.js";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
4
2
  import { useRef, useEffect } from "react";
5
- import { m as InputFilterStyled, n as InputFilterIconStyled, o as InputFilterInputStyled } from "../../slots/dynamicFilterSlots.js";
3
+ import { I as Icon } from "../../../Icon/Icon.js";
4
+ import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
5
+ import { u as useInputFilter } from "./useInputFilter.js";
6
+ import { e as InputFilterStyled, f as InputFilterInputSkeletonStyled, g as InputFilterInputStyled } from "../../slots/dynamicFilterSlots.js";
6
7
  import { P as PopoverMenuFields } from "../PopoverMenuFields/PopoverMenuFields.js";
7
8
  const InputFilter = () => {
8
9
  const {
@@ -14,33 +15,40 @@ const InputFilter = () => {
14
15
  canRender,
15
16
  filteredFields,
16
17
  selectedFieldIndex,
17
- setElementRef
18
+ setElementRef,
19
+ isOpenPopoverFilter,
20
+ isOpenPopoverMenuFields
18
21
  } = useInputFilter();
19
22
  const elementRef = useRef(null);
23
+ const { ownerState, size } = useDynamicFilterBase();
20
24
  useEffect(() => {
21
25
  setElementRef(elementRef);
22
26
  }, [setElementRef, elementRef]);
23
27
  if (!canRender) {
24
28
  return null;
25
29
  }
26
- if (isSkeleton) {
27
- return /* @__PURE__ */ jsx(InputFilterStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(InputFilterSkeleton, {}) });
28
- }
29
- return /* @__PURE__ */ jsxs(InputFilterStyled, { ownerState: {}, children: [
30
- /* @__PURE__ */ jsx(InputFilterIconStyled, { src: iconUrl, ownerState: {} }),
31
- /* @__PURE__ */ jsx(
32
- InputFilterInputStyled,
33
- {
34
- ref: elementRef,
35
- type: "text",
36
- value: inputData,
37
- placeholder: inputPlaceHolder,
38
- ownerState: {},
39
- ...inputHandlersProps
40
- }
41
- ),
42
- /* @__PURE__ */ jsx(PopoverMenuFields, { fields: filteredFields, selectFieldIndex: selectedFieldIndex })
43
- ] });
30
+ return /* @__PURE__ */ jsxs(
31
+ InputFilterStyled,
32
+ {
33
+ ownerState: { ...ownerState },
34
+ "aria-expanded": isOpenPopoverMenuFields || isOpenPopoverFilter,
35
+ children: [
36
+ /* @__PURE__ */ jsx(Icon, { size, src: iconUrl }),
37
+ isSkeleton ? /* @__PURE__ */ jsx(InputFilterInputSkeletonStyled, { ownerState: { ...ownerState }, variant: "rounded" }) : /* @__PURE__ */ jsx(
38
+ InputFilterInputStyled,
39
+ {
40
+ ref: elementRef,
41
+ type: "text",
42
+ value: inputData,
43
+ placeholder: inputPlaceHolder,
44
+ ownerState: { ...ownerState },
45
+ ...inputHandlersProps
46
+ }
47
+ ),
48
+ /* @__PURE__ */ jsx(PopoverMenuFields, { fields: filteredFields, selectFieldIndex: selectedFieldIndex })
49
+ ]
50
+ }
51
+ );
44
52
  };
45
53
  export {
46
54
  InputFilter as I
@@ -53,5 +53,13 @@ declare function useInputFilter(): {
53
53
  * Setter de la referencia del elemento (inputFilter)
54
54
  */
55
55
  setElementRef: (ref: import('react').MutableRefObject<HTMLElement | null>) => void;
56
+ /**
57
+ * Indica si el menú de campos está abierto
58
+ */
59
+ isOpenPopoverMenuFields: boolean | undefined;
60
+ /**
61
+ * Indica si el popoverSort está abierto
62
+ */
63
+ isOpenPopoverFilter: boolean;
56
64
  };
57
65
  export default useInputFilter;
@@ -10,6 +10,7 @@ function useInputFilter() {
10
10
  const { getLabel } = useModuleDictionary();
11
11
  const isSkeleton = useModuleSkeleton();
12
12
  const isOpenPopoverMenuFields = useDynamicFilterStore((state) => state.isOpenPopoverMenuFields);
13
+ const isOpenPopoverFilter = useDynamicFilterStore((state) => !!state.popoverFilterData);
13
14
  const withAllField = useDynamicFilterStore((state) => state.withAllField);
14
15
  const availableFields = useDynamicFilterStore((state) => state.availableFields);
15
16
  const inputData = useDynamicFilterStore((state) => state.inputData);
@@ -146,7 +147,15 @@ function useInputFilter() {
146
147
  /**
147
148
  * Setter de la referencia del elemento (inputFilter)
148
149
  */
149
- setElementRef
150
+ setElementRef,
151
+ /**
152
+ * Indica si el menú de campos está abierto
153
+ */
154
+ isOpenPopoverMenuFields,
155
+ /**
156
+ * Indica si el popoverSort está abierto
157
+ */
158
+ isOpenPopoverFilter
150
159
  };
151
160
  }
152
161
  export {
@@ -1,7 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { u as usePopoverFilter } from "./usePopoverFilter.js";
3
3
  import { D as DataTypeComponent } from "../FieldTypes/DataTypeComponent.js";
4
- import { P as PopoverStyled, p as PopoverHeaderStyled, q as PopoverHeaderIconStyled, r as PopoverHeaderTitleStyled, s as PopoverContainerFieldsStyled, t as PopoverHeaderActionsStyled } from "../../slots/dynamicFilterSlots.js";
4
+ import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
5
+ import { I as Icon } from "../../../Icon/Icon.js";
6
+ import { P as PopoverStyled, h as PopoverHeaderStyled, i as PopoverHeaderTitleStyled, C as ContentFilterStyled, j as PopoverContainerFieldsStyled, k as PopoverHeaderActionsStyled } from "../../slots/dynamicFilterSlots.js";
5
7
  import { R as RHFormProvider } from "../../../hook-form/RHFormContext/index.js";
6
8
  import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/ActionCancel.js";
7
9
  import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/ActionIntro.js";
@@ -20,6 +22,7 @@ function PopoverFilter() {
20
22
  statusLoad,
21
23
  canRender
22
24
  } = usePopoverFilter();
25
+ const { ownerState } = useDynamicFilterBase();
23
26
  if (!canRender) {
24
27
  return null;
25
28
  }
@@ -44,14 +47,16 @@ function PopoverFilter() {
44
47
  validationSchema: popupValidationSchema,
45
48
  statusLoad,
46
49
  children: [
47
- /* @__PURE__ */ jsxs(PopoverHeaderStyled, { ownerState: {}, children: [
48
- field.urlIcon && /* @__PURE__ */ jsx(PopoverHeaderIconStyled, { src: field.urlIcon, ownerState: {} }),
50
+ /* @__PURE__ */ jsxs(PopoverHeaderStyled, { ownerState: { ...ownerState }, children: [
51
+ field.urlIcon && /* @__PURE__ */ jsx(Icon, { src: field.urlIcon }),
49
52
  /* @__PURE__ */ jsx(PopoverHeaderTitleStyled, { variant: "paragraphDens", ownerState: {}, children: labelField })
50
53
  ] }),
51
- /* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(DataTypeComponent, { formFilter, statusLoad }) }),
52
- /* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { ownerState: {}, children: [
53
- /* @__PURE__ */ jsx(ActionCancel, { onClick: onClose, skeletonWidth: "68px" }),
54
- /* @__PURE__ */ jsx(ActionIntro, { skeletonWidth: "64px" })
54
+ /* @__PURE__ */ jsxs(ContentFilterStyled, { ownerState: { ...ownerState }, children: [
55
+ /* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(DataTypeComponent, { formFilter, statusLoad }) }),
56
+ /* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { ownerState: {}, children: [
57
+ /* @__PURE__ */ jsx(ActionCancel, { onClick: onClose, skeletonWidth: "68px" }),
58
+ /* @__PURE__ */ jsx(ActionIntro, { skeletonWidth: "64px" })
59
+ ] })
55
60
  ] })
56
61
  ]
57
62
  }
@@ -1,10 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { u as usePopoverMenuFields } from "./usePopoverMenuFields.js";
3
- import { u as PopoverMenuStyled, v as PopoverMenuItemStyled } from "../../slots/dynamicFilterSlots.js";
3
+ import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
4
+ import { M as MenuItem } from "../../../mui_extended/MenuItem/MenuItem.js";
5
+ import { l as PopoverMenuStyled } from "../../slots/dynamicFilterSlots.js";
4
6
  function PopoverMenuFields(props) {
5
7
  const { fields, selectFieldIndex } = props;
6
8
  const { elementRef, handleOpenPopUpClickItem, handleClosePopover, getItemLabel, isOpenPopoverMenuFields } = usePopoverMenuFields();
7
9
  const anchorEl = elementRef?.current;
10
+ const { size } = useDynamicFilterBase();
8
11
  return /* @__PURE__ */ jsx(
9
12
  PopoverMenuStyled,
10
13
  {
@@ -18,12 +21,12 @@ function PopoverMenuFields(props) {
18
21
  anchorEl,
19
22
  ownerState: {},
20
23
  children: isOpenPopoverMenuFields && fields.map((field, index) => /* @__PURE__ */ jsx(
21
- PopoverMenuItemStyled,
24
+ MenuItem,
22
25
  {
23
26
  dense: true,
27
+ size,
24
28
  selected: index === selectFieldIndex,
25
29
  onClick: (event) => handleOpenPopUpClickItem(event, field),
26
- ownerState: {},
27
30
  startIcon: field.urlIcon,
28
31
  label: getItemLabel(field)
29
32
  },
@@ -0,0 +1,9 @@
1
+ import { DynamicFilterProps } from '../types';
2
+ export declare const fields: DynamicFilterProps['fields'];
3
+ export declare const allFields: DynamicFilterProps['fields'];
4
+ export declare const userTypes: {
5
+ id: number;
6
+ name: string;
7
+ add_privilege: string;
8
+ user_assignable: boolean;
9
+ }[];
@@ -1,3 +1,4 @@
1
+ import { Sizes } from '@m4l/styles';
1
2
  import { Theme } from '@mui/material/styles';
2
3
  import { Maybe } from '@m4l/core';
3
4
  import { RHFAutocompleteAsyncBaseProps } from '../hook-form/RHFAutocompleteAsync/types';
@@ -255,6 +256,10 @@ export interface DynamicFilterProps {
255
256
  onChangeFilters?: OnChangeFilters;
256
257
  /** Key único necesario para las pruebas del componente. */
257
258
  dataTestId?: string;
259
+ /**
260
+ * Size del componente
261
+ */
262
+ size?: Extract<Sizes, 'small' | 'medium'>;
258
263
  }
259
264
  /**
260
265
  * Interface que define la variables que se van a usar en clases del componente
@@ -284,6 +289,10 @@ export interface OwnerState {
284
289
  * "isEmpty" Define si existen filtros aplicados
285
290
  */
286
291
  isEmpty: boolean;
292
+ /**
293
+ * Size del componente
294
+ */
295
+ size?: Extract<Sizes, 'small' | 'medium'>;
287
296
  }
288
297
  export interface DynamicFilterOwnerState extends DynamicFilterProps, OwnerState {
289
298
  }
@@ -1,4 +1,3 @@
1
- import { c as containerQuery } from "../../utils/containerQuery.js";
2
1
  import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
3
2
  import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
4
3
  const CONTAINER_QUERY_NAME = "dynamic";
@@ -24,26 +23,13 @@ const dynamicSortStyles = {
24
23
  justifyContent: "flex-start",
25
24
  width: "100%",
26
25
  height: "fit-content",
27
- border: "1px solid",
28
- borderRadius: "4px",
29
- borderColor: theme.vars.palette.border?.default,
26
+ border: theme.vars.size.borderStroke.container,
27
+ borderRadius: theme.vars.size.borderRadius.r1,
28
+ borderColor: ownerState.isValid ? theme.vars.palette.border?.default : theme.vars.palette.error.enabled,
30
29
  background: theme.vars.palette.background.default,
31
- [containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
32
- minHeight: "auto",
33
- height: "auto",
34
- gridTemplateColumns: "1fr auto",
35
- gridTemplateAreas: `"input-sort actions-sort"
36
- "applied-sorts applied-sorts"`
37
- },
38
30
  '&:has([aria-expanded="true"])': {
39
- borderColor: theme.vars.palette.primary.active
40
- },
41
- "&:focus-within": {
42
- borderColor: !ownerState.isValid ? theme.vars.palette.error.enabled : theme.vars.palette.primary.active
43
- },
44
- ...ownerState.isValid === false ? {
45
- borderColor: theme.vars.palette.error.enabled
46
- } : {}
31
+ borderColor: ownerState.isValid ? theme.vars.palette.primary.active : theme.vars.palette.error.enabled
32
+ }
47
33
  }),
48
34
  /**
49
35
  * inputSort: Estilos del contenedor del campo de entrada de ordenamiento.
@@ -56,26 +42,21 @@ const dynamicSortStyles = {
56
42
  paddingRight: theme.vars.size.baseSpacings.sp1,
57
43
  height: "100%",
58
44
  overflow: "hidden",
45
+ maxWidth: "135px",
46
+ width: "100%",
47
+ alignItems: "center",
48
+ borderTopLeftRadius: theme.vars.size.borderRadius.r1,
49
+ borderBottomLeftRadius: theme.vars.size.borderRadius.r1,
50
+ borderRight: theme.vars.size.borderStroke.container,
51
+ borderColor: theme.vars.palette.border?.default,
59
52
  ...getSizeStyles(
60
53
  theme,
61
54
  ownerState.size || "medium",
62
55
  "container",
63
56
  (size) => ({
64
- height: size,
65
- minHeight: size,
66
- maxHeight: size
57
+ height: size
67
58
  })
68
- ),
69
- maxWidth: "135px",
70
- width: "100%",
71
- alignItems: "center",
72
- borderTopLeftRadius: "4px",
73
- borderBottomLeftRadius: "4px",
74
- borderRight: "1px solid",
75
- borderColor: theme.vars.palette.border?.default,
76
- [containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
77
- borderRight: "none"
78
- }
59
+ )
79
60
  }),
80
61
  /**
81
62
  * inputSortInput: Estilos del campo de entrada de ordenamiento.
@@ -109,10 +90,10 @@ const dynamicSortStyles = {
109
90
  },
110
91
  "&:focus-visible": {
111
92
  color: theme.vars.palette.text.secondary,
112
- border: "1px solid",
93
+ border: theme.vars.size.borderStroke.container,
113
94
  borderColor: theme.vars.palette.primary.opacity,
114
95
  background: theme.vars.palette.primary.opacity,
115
- BorderRadius: "2px",
96
+ BorderRadius: theme.vars.size.borderRadius["r0-5"],
116
97
  outline: "none!important"
117
98
  },
118
99
  "&:hover": {
@@ -120,7 +101,6 @@ const dynamicSortStyles = {
120
101
  background: theme.vars.palette.background?.hover
121
102
  }
122
103
  }),
123
- inputSortIcon: {},
124
104
  /**
125
105
  * appliedSorts: Estilos del contenedor de los campos de ordenamiento aplicados.
126
106
  */
@@ -129,53 +109,31 @@ const dynamicSortStyles = {
129
109
  width: "100%",
130
110
  height: "fit-content",
131
111
  overflow: "hidden",
132
- paddingLeft: theme.spacing(1),
133
112
  borderLeft: "none",
134
113
  margin: "0px",
135
- padding: "0px 4px",
136
- [containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
137
- height: "auto",
138
- display: "flex",
139
- borderTop: "1px solid ",
140
- borderColor: theme.vars.palette.border?.secondary,
141
- "&:has(div[class*=appliedSortInnerContainer]:empty), &:empty": {
142
- display: "none"
143
- }
144
- }
114
+ padding: `0px ${theme.vars.size.baseSpacings.sp1}`
145
115
  }),
146
116
  /**
147
117
  * appliedSortInnerContainer: Estilos del contenedor interno de los campos de ordenamiento aplicados.
148
118
  */
149
119
  appliedSortInnerContainer: ({ theme }) => ({
150
- padding: "2px",
151
- gap: "4px",
120
+ overflow: "overlay",
121
+ overflowY: "hidden",
122
+ padding: theme.vars.size.baseSpacings["sp0-5"],
123
+ gap: theme.vars.size.baseSpacings.sp1,
152
124
  height: "fit-content",
153
125
  display: "flex",
154
126
  flexWrap: "nowrap",
155
127
  width: "100%",
156
128
  justifyContent: "flex-start",
157
- alignItems: "center",
158
- [containerQuery(theme.breakpoints, CONTAINER_QUERY_NAME)]: {
159
- height: "32px",
160
- padding: 0,
161
- margin: 0,
162
- border: 0
163
- },
164
- [theme.breakpoints.down("sm")]: {
165
- padding: 0,
166
- height: "44px"
167
- }
129
+ alignItems: "center"
168
130
  }),
169
- /**
170
- * appliedSortChip: Estilos del chip de ordenamiento aplicado.
171
- */
172
- appliedSortChip: {},
173
131
  /**
174
132
  * actions: Estilos del contenedor de los botones de acción.
175
133
  */
176
134
  actions: ({ theme }) => ({
177
- overflow: "hidden",
178
135
  gridArea: "actions-sort",
136
+ overflow: "hidden",
179
137
  display: "flex",
180
138
  flexDirection: "row",
181
139
  gap: theme.vars.size.baseSpacings["sp0-5"],
@@ -205,19 +163,11 @@ const dynamicSortStyles = {
205
163
  "& .MuiPaper-root": {
206
164
  display: "flex",
207
165
  flexDirection: "column",
208
- padding: "8px 0 !important",
209
- gap: "4px",
210
- borderRadius: "6px",
211
- [theme.breakpoints.down("md")]: {
212
- gap: "4px"
213
- },
214
- "& .M4LPopover-arrowStyle": {
215
- display: "none"
216
- }
166
+ padding: theme.vars.size.baseSpacings.sp3,
167
+ gap: theme.vars.size.baseSpacings.sp1,
168
+ borderRadius: theme.vars.size.borderRadius.r1
217
169
  }
218
170
  }),
219
- popoverMenuItem: {},
220
- popoverMenuItemIcon: {},
221
171
  /**
222
172
  * popoverSort: Estilos del menú emergente de ordenamiento.
223
173
  */
@@ -244,63 +194,62 @@ const dynamicSortStyles = {
244
194
  /**
245
195
  * popoverSortHeader: Estilos del encabezado del menú emergente de ordenamiento.
246
196
  */
247
- popoverSortHeader: ({ theme }) => ({
248
- backgroundColor: theme.vars.palette.background?.surface,
197
+ popoverSortHeader: ({ theme, ownerState }) => ({
249
198
  display: "flex",
250
199
  alignItems: "center",
251
- gap: "8px",
252
- padding: "4px 4px 4px 8px",
253
- borderTopLeftRadius: "4px",
254
- borderTopRightRadius: "4px",
255
- borderBottom: "0px",
256
- height: "28px",
257
- [theme.breakpoints.down("sm")]: {
258
- height: "36px"
259
- }
200
+ gap: theme.vars.size.baseSpacings.sp2,
201
+ padding: theme.vars.size.baseSpacings.sp1,
202
+ paddingLeft: theme.vars.size.baseSpacings.sp2,
203
+ borderTopLeftRadius: theme.vars.size.borderRadius.r1,
204
+ borderTopRightRadius: theme.vars.size.borderRadius.r1,
205
+ borderBottom: theme.vars.size.borderStroke.container,
206
+ borderColor: theme.vars.palette.border.secondary,
207
+ "& .MuiTypography-root": {
208
+ color: theme.vars.palette.primary.main
209
+ },
210
+ "& .M4LIcon-icon": {
211
+ backgroundColor: theme.vars.palette.primary.main
212
+ },
213
+ ...getSizeStyles(
214
+ theme,
215
+ ownerState.size || "medium",
216
+ "container",
217
+ (size) => ({
218
+ height: size
219
+ })
220
+ )
260
221
  }),
261
- popoverSortHeaderIcon: {},
262
222
  /**
263
223
  * popoverSortHeaderTitle: Estilos del título del menú emergente de ordenamiento.
264
224
  */
265
225
  popoverSortHeaderTitle: ({ theme }) => ({
266
- ...theme.typography.paragraphDens,
267
- color: theme.vars.palette.text.primary
226
+ color: `${theme.vars.palette.primary.main} !important`
268
227
  }),
269
228
  /**
270
229
  * popoverSortContainerFields: Estilos del contenedor de campos del menú emergente de ordenamiento.
271
230
  */
272
- popoverSortContainerFields: ({ theme }) => ({
231
+ popoverSortContainerFields: () => ({
273
232
  height: "fit-content",
274
233
  "& > div": {
275
234
  display: "flex",
276
235
  height: "auto",
277
- flexDirection: "column",
278
- padding: "12px 12px 0 12px",
279
- gap: "8px",
280
- [theme.breakpoints.down("sm")]: {
281
- padding: "16px 16px 0 16px",
282
- gap: "12px"
283
- }
236
+ flexDirection: "column"
284
237
  }
285
238
  }),
239
+ /**
240
+ * contentSort: Estilos del contenedor entre el change sort y actions
241
+ */
242
+ contentSort: ({ theme }) => ({
243
+ display: "flex",
244
+ flexDirection: "column",
245
+ padding: theme.vars.size.baseSpacings.sp3,
246
+ gap: theme.vars.size.baseSpacings.sp3
247
+ }),
286
248
  /**
287
249
  * popoverSortActions: Estilos del contenedor de acciones del menú emergente de ordenamiento.
288
250
  */
289
251
  popoverSortActions: ({ theme }) => ({
290
- display: "flex",
291
- flexDirection: "row",
292
- gap: "16px",
293
- padding: "16px 12px 12px 12px !important",
294
- [theme.breakpoints.down("sm")]: {
295
- padding: "24px 16px 16px 16px !important"
296
- },
297
- "& > .M4LButton-root": {
298
- height: "24px",
299
- minHeight: "24px",
300
- [theme.breakpoints.down("sm")]: {
301
- height: "36px"
302
- }
303
- }
252
+ padding: `${theme.vars.size.baseSpacings.sp3} 0px`
304
253
  }),
305
254
  /**
306
255
  * inputSortInputSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
@@ -10,18 +10,12 @@ export declare const InputSortStyled: import('@emotion/styled').StyledComponent<
10
10
  export declare const InputSortInputStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
11
11
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
12
12
  }, Pick<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, keyof import('react').ClassAttributes<HTMLInputElement> | keyof import('react').InputHTMLAttributes<HTMLInputElement>>, {}>;
13
- export declare const InputSortIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
14
- ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
15
- }, {}, {}>;
16
13
  export declare const AppliedSortsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
17
14
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
18
15
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
19
16
  export declare const AppliedSortInnerContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
20
17
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
21
18
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
22
- export declare const AppliedSortChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Chip').ChipProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../Chip').ChipProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
23
- ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
24
- }, {}, {}>;
25
19
  export declare const ActionsStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
26
20
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
27
21
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -34,12 +28,6 @@ export declare const ActionsSubmitButtonStyled: import('@emotion/styled').Styled
34
28
  export declare const PopoverMenuStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
35
29
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
36
30
  }, {}, {}>;
37
- export declare const PopoverMenuItemStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/MenuItem/types').MenuItemProps, keyof import('../../mui_extended/MenuItem/types').MenuItemProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
38
- ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
39
- }, {}, {}>;
40
- export declare const PopoverMenuItemIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
41
- ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
42
- }, {}, {}>;
43
31
  export declare const PopoverStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Popover/types').PopoverProps, keyof import('../../mui_extended/Popover/types').PopoverProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
44
32
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
45
33
  }, {}, {}>;
@@ -49,9 +37,9 @@ export declare const PopoverContainerFieldsStyled: import('@emotion/styled').Sty
49
37
  export declare const PopoverHeaderStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
50
38
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
51
39
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
52
- export declare const PopoverHeaderIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
40
+ export declare const ContentSortStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
53
41
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
54
- }, {}, {}>;
42
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
55
43
  export declare const PopoverHeaderTitleStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
56
44
  ownerState: Partial<import('../types').DynamicSortOwnerState> & Record<string, unknown>;
57
45
  }, {}, {}>;