@m4l/components 9.1.3 → 9.1.5

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 (99) hide show
  1. package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
  2. package/components/ControlIncrement/slots/ControltrolIncrementSlots.d.ts +1 -1
  3. package/components/DragResizeWindow/DragResizeWindow.d.ts +9 -5
  4. package/components/DragResizeWindow/DragResizeWindow.js +7 -6
  5. package/components/DragResizeWindow/DragResizeWindow.styles.d.ts +4 -0
  6. package/components/DragResizeWindow/DragResizeWindow.styles.js +20 -3
  7. package/components/DragResizeWindow/classes/index.js +2 -2
  8. package/components/DragResizeWindow/constants.d.ts +1 -1
  9. package/components/DragResizeWindow/constants.js +2 -2
  10. package/components/DragResizeWindow/helpers/index.d.ts +14 -1
  11. package/components/DragResizeWindow/helpers/index.js +0 -2
  12. package/components/DragResizeWindow/hooks/useDimensionEffects.d.ts +4 -0
  13. package/components/DragResizeWindow/hooks/useDimensionEffects.js +128 -50
  14. package/components/DragResizeWindow/hooks/useDragOptions.d.ts +3 -3
  15. package/components/DragResizeWindow/hooks/useResizeOptions.d.ts +20 -1
  16. package/components/DragResizeWindow/hooks/useResizeOptions.js +1 -1
  17. package/components/DragResizeWindow/slots/DragResizeWindowSlots.js +3 -3
  18. package/components/DragResizeWindow/tests/DragResizeWindow.test.d.ts +1 -0
  19. package/components/DragResizeWindow/types.d.ts +85 -13
  20. package/components/DragResizeWindow/utils.d.ts +12 -1
  21. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
  22. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
  23. package/components/GridLayout/subcomponents/GridItem/index.js +1 -1
  24. package/components/Label/slots/LabelSlots.d.ts +1 -1
  25. package/components/areas/components/AreasViewer/styles.js +1 -1
  26. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/WindowModal/index.js +1 -1
  27. package/components/extended/{react-resizable → React-Resizable}/Resizable/Resizable.d.ts +4 -0
  28. package/components/extended/React-Resizable/Resizable/Resizable.js +20 -0
  29. package/components/extended/{react-resizable → React-Resizable}/Resizable/Resizeable.styles.d.ts +1 -1
  30. package/components/extended/{react-resizable → React-Resizable}/Resizable/constants.d.ts +1 -0
  31. package/components/extended/React-Resizable/Resizable/constants.js +6 -0
  32. package/components/extended/{react-resizable → React-Resizable}/Resizable/slots/ResizableSlots.js +1 -1
  33. package/components/extended/{react-resizable → React-Resizable}/ResizableBox/ResizableBox.d.ts +6 -2
  34. package/components/extended/React-Resizable/ResizableBox/ResizableBox.js +41 -0
  35. package/components/extended/React-Resizable/ResizableBox/ResizeableBox.styles.js +17 -0
  36. package/components/extended/{react-resizable → React-Resizable}/ResizableBox/slots/ResizableBoxSlots.js +1 -1
  37. package/components/extended/React-Resizable/ResizableBox/tests/ResizableBox.integration.test.d.ts +1 -0
  38. package/components/extended/React-Resizable/ResizableBox/tests/ResizableBox.test.d.ts +1 -0
  39. package/components/extended/React-Resizable/ResizableBox/types.d.ts +46 -0
  40. package/components/extended/React-Resizable/helpers.d.ts +197 -0
  41. package/components/extended/React-Resizable/helpers.js +112 -0
  42. package/components/extended/React-Resizable/hooks/useResizable.d.ts +16 -0
  43. package/components/extended/React-Resizable/hooks/useResizable.js +24 -0
  44. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  45. package/components/index.d.ts +1 -1
  46. package/components/modal/ModalDialog/index.d.ts +4 -0
  47. package/components/modal/ModalDialog/index.js +3 -3
  48. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  49. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
  50. package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
  51. package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
  52. package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
  53. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
  54. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +2 -2
  55. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  56. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +63 -2
  57. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +1 -1
  58. package/contexts/ModalContext/index.d.ts +4 -0
  59. package/contexts/ModalContext/types.d.ts +1 -1
  60. package/index.js +2 -2
  61. package/package.json +1 -1
  62. package/storybook/components/DragResizeWindow/stories/DragResizeWindow.stories.d.ts +7 -0
  63. package/storybook/components/DragResizeWindow/stories/subcomponents/ContentExample.d.ts +8 -0
  64. package/{components → storybook/components}/DragResizeWindow/stories/subcomponents/WithExtendedContainer.d.ts +4 -0
  65. package/{components → storybook/components}/DragResizeWindow/stories/types.d.ts +1 -1
  66. package/storybook/components/extended/react-resizable/ResizableBox/resizableBox.stories.d.ts +13 -0
  67. package/components/DragResizeWindow/stories/basic.stories.d.ts +0 -13
  68. package/components/DragResizeWindow/stories/dictionary.d.ts +0 -0
  69. package/components/DragResizeWindow/stories/subcomponents/ContentExample.d.ts +0 -4
  70. package/components/extended/react-resizable/Resizable/Resizable.js +0 -8
  71. package/components/extended/react-resizable/Resizable/constants.js +0 -4
  72. package/components/extended/react-resizable/Resizable/stories/basic.stories.d.ts +0 -9
  73. package/components/extended/react-resizable/ResizableBox/ResizableBox.js +0 -29
  74. package/components/extended/react-resizable/ResizableBox/ResizeableBox.styles.js +0 -13
  75. package/components/extended/react-resizable/ResizableBox/stories/basic.stories.d.ts +0 -9
  76. package/components/extended/react-resizable/ResizableBox/types.d.ts +0 -15
  77. package/components/extended/react-resizable/helpers.d.ts +0 -80
  78. package/components/extended/react-resizable/helpers.js +0 -91
  79. /package/components/extended/{react-resizable → React-Resizable}/Resizable/index.d.ts +0 -0
  80. /package/components/extended/{react-resizable → React-Resizable}/Resizable/index.js +0 -0
  81. /package/components/extended/{react-resizable → React-Resizable}/Resizable/slots/ResizableSlots.d.ts +0 -0
  82. /package/components/extended/{react-resizable → React-Resizable}/Resizable/slots/slots.d.ts +0 -0
  83. /package/components/extended/{react-resizable → React-Resizable}/Resizable/slots/slots.js +0 -0
  84. /package/components/{DragResizeWindow → extended/React-Resizable/Resizable}/stories/constants.d.ts +0 -0
  85. /package/components/extended/{react-resizable → React-Resizable}/Resizable/stories/types.d.ts +0 -0
  86. /package/components/extended/{react-resizable → React-Resizable}/Resizable/types.d.ts +0 -0
  87. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/ResizeableBox.styles.d.ts +0 -0
  88. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/constants.d.ts +0 -0
  89. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/constants.js +0 -0
  90. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/index.d.ts +0 -0
  91. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/index.js +0 -0
  92. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/slots/ResizableBoxSlots.d.ts +0 -0
  93. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/slots/slots.d.ts +0 -0
  94. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/slots/slots.js +0 -0
  95. /package/components/extended/{react-resizable/Resizable → React-Resizable/ResizableBox}/stories/constants.d.ts +0 -0
  96. /package/components/extended/{react-resizable → React-Resizable}/ResizableBox/stories/types.d.ts +0 -0
  97. /package/components/extended/{react-resizable → React-Resizable}/index.d.ts +0 -0
  98. /package/components/extended/{react-resizable → React-Resizable}/index.js +0 -0
  99. /package/{components/extended/react-resizable/ResizableBox → storybook/components/DragResizeWindow}/stories/constants.d.ts +0 -0
@@ -1,13 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { DragResizeWindow } from '../DragResizeWindow';
3
- import { StoryDragResizeWindowType } from './types';
4
- declare const meta: Meta<typeof DragResizeWindow>;
5
- export default meta;
6
- /**
7
- * DragResizeWindow con los resize nodes por defecto
8
- */
9
- export declare const Base: StoryDragResizeWindowType;
10
- /**
11
- * DragResizeWindow oculto
12
- */
13
- export declare const Hidden: StoryDragResizeWindowType;
@@ -1,4 +0,0 @@
1
- /**
2
- * TODO: Documentar
3
- */
4
- export declare const ContentExample: React.FC<Record<string, any>>;
@@ -1,8 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { R as RootStyled } from "./slots/ResizableSlots.js";
3
- const Resizable = (props) => {
4
- return /* @__PURE__ */ jsx(RootStyled, { ...props });
5
- };
6
- export {
7
- Resizable as R
8
- };
@@ -1,4 +0,0 @@
1
- const COMPONET_KEY_COMPONENT = "M4LResizable";
2
- export {
3
- COMPONET_KEY_COMPONENT as C
4
- };
@@ -1,9 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { Resizable } from '../Resizable';
3
- import { StoryResizableType } from './types';
4
- declare const meta: Meta<typeof Resizable>;
5
- export default meta;
6
- /**
7
- * Resizable
8
- */
9
- export declare const Base: StoryResizableType;
@@ -1,29 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { R as RootStyled } from "./slots/ResizableBoxSlots.js";
3
- function ResizableBox(props) {
4
- const {
5
- children,
6
- width = 600,
7
- height = 400,
8
- maxHeigth,
9
- onResize,
10
- maxWidth,
11
- resizeHandles = ["se", "nw"],
12
- ...other
13
- } = props;
14
- return /* @__PURE__ */ jsx(
15
- RootStyled,
16
- {
17
- width,
18
- height,
19
- onResize,
20
- maxConstraints: maxHeigth && maxWidth ? [maxWidth, maxHeigth] : void 0,
21
- resizeHandles,
22
- ...other,
23
- children
24
- }
25
- );
26
- }
27
- export {
28
- ResizableBox as R
29
- };
@@ -1,13 +0,0 @@
1
- import { g as getReactResizableStyles } from "../helpers.js";
2
- const resizableBoxStyles = {
3
- /**
4
- * TODO: Documentar
5
- */
6
- root: ({ theme }) => ({
7
- ...getReactResizableStyles(theme),
8
- position: "absolute"
9
- })
10
- };
11
- export {
12
- resizableBoxStyles as r
13
- };
@@ -1,9 +0,0 @@
1
- import { Meta } from '@storybook/react';
2
- import { ResizableBox } from '../ResizableBox';
3
- import { StoryResizableBoxType } from './types';
4
- declare const meta: Meta<typeof ResizableBox>;
5
- export default meta;
6
- /**
7
- * ResizableBox
8
- */
9
- export declare const Base: StoryResizableBoxType;
@@ -1,15 +0,0 @@
1
- import { ResizableBoxProps, ResizeCallbackData } from 'react-resizable';
2
- import { ResizableBoxSlots } from './slots/slots';
3
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
4
- import { Theme } from '@mui/material/styles';
5
- import { COMPONET_KEY_COMPONENT } from './constants';
6
- type InternalResizeableProps = {
7
- maxWidth?: number;
8
- maxHeigth?: number;
9
- onResize?: (e: React.SyntheticEvent, data: ResizeCallbackData) => void;
10
- };
11
- export type ResizeableProps = InternalResizeableProps & Partial<ResizableBoxProps>;
12
- export type ResizableBoxSlotsType = keyof typeof ResizableBoxSlots;
13
- export type ResizableOwnerState = {};
14
- export type ResizableBoxStyles = Partial<OverridesStyleRules<ResizableBoxSlotsType, typeof COMPONET_KEY_COMPONENT, Theme> | undefined> | undefined;
15
- export {};
@@ -1,80 +0,0 @@
1
- import { Theme } from '@mui/material';
2
- /**
3
- * TODO: Documentar
4
- */
5
- export declare const getReactResizableStyles: (theme: Theme) => {
6
- position: string;
7
- backgroundColor: string;
8
- cursor: string;
9
- prop2: number;
10
- '&.react-resizable': {
11
- position: string;
12
- };
13
- '& .react-resizable-handle': {
14
- position: string;
15
- width: string;
16
- height: string;
17
- boxSizing: string;
18
- border: string;
19
- padding: string;
20
- margin: string;
21
- borderBottomRightRadius: string;
22
- };
23
- '& .react-resizable-handle.react-resizable-hide': {
24
- display: string;
25
- };
26
- '& .react-resizable-handle-sw, .react-resizable-handle-se, .react-resizable-handle-nw, .react-resizable-handle-ne': {
27
- borderRight: string;
28
- borderBottom: string;
29
- };
30
- '& .react-resizable-handle-sw': {
31
- bottom: string;
32
- left: string;
33
- cursor: string;
34
- transform: string;
35
- position: string;
36
- };
37
- '& .react-resizable-handle-se': {
38
- bottom: string;
39
- right: string;
40
- cursor: string;
41
- };
42
- '& .react-resizable-handle-nw': {
43
- top: string;
44
- left: string;
45
- cursor: string;
46
- transform: string;
47
- };
48
- '& .react-resizable-handle-ne': {
49
- top: string;
50
- right: string;
51
- cursor: string;
52
- transform: string;
53
- };
54
- '& .react-resizable-handle-w, .react-resizable-handle-e': {
55
- top: string;
56
- marginTop: string;
57
- cursor: string;
58
- };
59
- '& .react-resizable-handle-w': {
60
- left: string;
61
- borderLeft: string;
62
- };
63
- '& .react-resizable-handle-e': {
64
- right: string;
65
- borderRight: string;
66
- };
67
- '& .react-resizable-handle-n,.react-resizable-handle-s': {
68
- left: string;
69
- marginLeft: string;
70
- cursor: string;
71
- };
72
- '& .react-resizable-handle-n': {
73
- top: string;
74
- borderTop: string;
75
- };
76
- '& .react-resizable-handle-s': {
77
- bottom: string;
78
- borderBottom: string;
79
- };
80
- };
@@ -1,91 +0,0 @@
1
- const borderWith = 2;
2
- const getReactResizableStyles = (theme) => ({
3
- position: "absolute",
4
- // left: '0px',
5
- // top: '0px',
6
- // width: '0px',
7
- // height: '0px',
8
- backgroundColor: "red",
9
- cursor: "default",
10
- prop2: 12222,
11
- "&.react-resizable": {
12
- position: "relative"
13
- },
14
- "& .react-resizable-handle": {
15
- position: "absolute",
16
- width: "8px",
17
- height: "8px",
18
- boxSizing: "border-box",
19
- border: "red",
20
- padding: "0 3px 3px 0",
21
- margin: "0px",
22
- //Nueva con respecto al css
23
- borderBottomRightRadius: "15%"
24
- },
25
- // Si no tiene habilitado el resize, se ocultan los handlers
26
- "& .react-resizable-handle.react-resizable-hide": {
27
- display: "none"
28
- },
29
- "& .react-resizable-handle-sw, .react-resizable-handle-se, .react-resizable-handle-nw, .react-resizable-handle-ne": {
30
- borderRight: `${borderWith}px solid ${theme.vars.palette.text.disabled}`,
31
- borderBottom: `2px solid ${theme.vars.palette.text.disabled}`
32
- },
33
- "& .react-resizable-handle-sw": {
34
- bottom: "0",
35
- left: "0",
36
- cursor: "sw-resize",
37
- transform: "rotate(90deg)",
38
- position: "absolute"
39
- //Nueva con respecto al css
40
- },
41
- "& .react-resizable-handle-se": {
42
- bottom: "0",
43
- right: "0",
44
- cursor: "se-resize"
45
- },
46
- "& .react-resizable-handle-nw": {
47
- top: "0",
48
- left: "0",
49
- cursor: "nw-resize",
50
- transform: "rotate(180deg)"
51
- },
52
- "& .react-resizable-handle-ne": {
53
- top: "0",
54
- right: "0",
55
- cursor: "ne-resize",
56
- transform: "rotate(270deg)"
57
- },
58
- "& .react-resizable-handle-w, .react-resizable-handle-e": {
59
- top: "50%",
60
- marginTop: "-10px",
61
- cursor: "ew-resize"
62
- },
63
- "& .react-resizable-handle-w": {
64
- left: "0",
65
- borderLeft: `${borderWith}px solid ${theme.vars.palette.text.disabled}`
66
- // transform: 'rotate(135deg)',
67
- },
68
- "& .react-resizable-handle-e": {
69
- right: "0",
70
- borderRight: `${borderWith}px solid ${theme.vars.palette.text.disabled}`
71
- // transform: 'rotate(315deg) ',
72
- },
73
- "& .react-resizable-handle-n,.react-resizable-handle-s": {
74
- left: "50%",
75
- marginLeft: "-10px",
76
- cursor: "ns-resize"
77
- },
78
- "& .react-resizable-handle-n": {
79
- top: "0",
80
- // transform: 'rotate(225deg)',
81
- borderTop: `${borderWith}px solid ${theme.vars.palette.text.disabled}`
82
- },
83
- "& .react-resizable-handle-s": {
84
- bottom: "0",
85
- // transform: 'rotate(45deg)',
86
- borderBottom: `${borderWith}px solid ${theme.vars.palette.text.disabled}`
87
- }
88
- });
89
- export {
90
- getReactResizableStyles as g
91
- };