@m4l/components 9.2.41 → 9.2.42

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 (24) hide show
  1. package/components/extended/React-resizable-panels/SplitLayout.d.ts +14 -0
  2. package/components/extended/React-resizable-panels/SplitLayout.js +40 -0
  3. package/components/extended/React-resizable-panels/SplitLayout.styles.d.ts +2 -0
  4. package/components/extended/React-resizable-panels/SplitLayout.styles.js +99 -0
  5. package/components/extended/React-resizable-panels/constants.d.ts +4 -0
  6. package/components/extended/React-resizable-panels/constants.js +4 -0
  7. package/components/extended/React-resizable-panels/index.d.ts +2 -0
  8. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +6 -0
  9. package/components/extended/{React-Splitter-Layout → React-resizable-panels}/slots/SplitLayoutEnum.js +1 -0
  10. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +65 -0
  11. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +27 -0
  12. package/components/extended/React-resizable-panels/tests/SplitLayout.test.d.ts +1 -0
  13. package/components/extended/React-resizable-panels/types.d.ts +17 -0
  14. package/components/extended/index.d.ts +1 -1
  15. package/index.js +1 -1
  16. package/package.json +2 -1
  17. package/storybook/components/extended/React-resizable-panels/SplitLayout.stories.d.ts +13 -0
  18. package/commonjs/index.js +0 -8
  19. package/components/extended/React-Splitter-Layout/SplitLayout.js +0 -53
  20. package/components/extended/React-Splitter-Layout/SplitLayout.styles.js +0 -157
  21. package/components/extended/React-Splitter-Layout/constants.js +0 -6
  22. package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.js +0 -21
  23. package/internal_libs/react-splitter-layout.js +0 -158
  24. /package/components/extended/{React-Splitter-Layout → React-resizable-panels}/index.js +0 -0
@@ -0,0 +1,14 @@
1
+ import { SplitLayoutProps } from './types';
2
+ /**
3
+ * Componente SplitLayout que permite dividir la pantalla en dos partes, la primera parte se muestra en el lado izquierdo y la segunda parte se muestra en el lado derecho.
4
+ * de la libreria de react-resizable-panels
5
+ *@example
6
+ * ```
7
+ * <SplitLayout
8
+ * splitPosition={isDesktop ? splitPosition : 'none'}
9
+ * firstPart={masterComponent}
10
+ * secondPart={detailComponent}
11
+ * />
12
+ * ```
13
+ */
14
+ export declare const SplitLayout: (props: SplitLayoutProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
3
+ import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
4
+ import { S as SPLIT_LAYOUT_KEY_COMPONENT } from "./constants.js";
5
+ import { S as SplitLayoutSlots } from "./slots/SplitLayoutEnum.js";
6
+ import { S as SplitLayoutRootStyled, a as SplitMasterStyled, b as SplitResizeHandleStyled, c as SplitDetailStyled } from "./slots/SplitLayoutSlots.js";
7
+ const SplitLayout = (props) => {
8
+ const { firstPart, secondPart, splitPosition, dataTestId } = props;
9
+ const classes = getComponentClasses(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots);
10
+ return /* @__PURE__ */ jsx(Fragment, { children: splitPosition === "none" ? void 0 : /* @__PURE__ */ jsxs(
11
+ SplitLayoutRootStyled,
12
+ {
13
+ ...getPropDataTestId(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots.root, dataTestId),
14
+ className: classes.root,
15
+ direction: splitPosition,
16
+ children: [
17
+ /* @__PURE__ */ jsx(
18
+ SplitMasterStyled,
19
+ {
20
+ ...getPropDataTestId(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots.splitMaster, dataTestId),
21
+ className: classes.master,
22
+ children: typeof firstPart === "function" ? firstPart() : firstPart
23
+ }
24
+ ),
25
+ /* @__PURE__ */ jsx(SplitResizeHandleStyled, { className: `${classes.splitResizeHandle}-${splitPosition}` }),
26
+ /* @__PURE__ */ jsx(
27
+ SplitDetailStyled,
28
+ {
29
+ ...getPropDataTestId(SPLIT_LAYOUT_KEY_COMPONENT, SplitLayoutSlots.splitDetail, dataTestId),
30
+ className: classes.splitDetail,
31
+ children: typeof secondPart === "function" ? secondPart() : secondPart
32
+ }
33
+ )
34
+ ]
35
+ }
36
+ ) });
37
+ };
38
+ export {
39
+ SplitLayout as S
40
+ };
@@ -0,0 +1,2 @@
1
+ import { SplitLayoutStyles } from './types';
2
+ export declare const splitLayoutStyles: SplitLayoutStyles;
@@ -0,0 +1,99 @@
1
+ const splitLayoutStyles = {
2
+ /**
3
+ * Estilos para el root
4
+ */
5
+ root: ({ theme }) => ({
6
+ display: "flex",
7
+ height: "100%",
8
+ gap: theme.vars.size.baseSpacings.sp2
9
+ }),
10
+ /**
11
+ * Estilos para el splitMaster
12
+ */
13
+ splitMaster: {
14
+ position: "relative",
15
+ width: "100%",
16
+ height: "100%",
17
+ display: "flex",
18
+ flexDirection: "column",
19
+ overflow: "hidden",
20
+ "& .M4LStack-root": {
21
+ gap: "8px"
22
+ }
23
+ },
24
+ /**
25
+ * Estilos para el splitDetail
26
+ */
27
+ splitDetail: {
28
+ position: "relative",
29
+ width: "100%",
30
+ height: "100%",
31
+ display: "flex",
32
+ flexDirection: "column",
33
+ justifyContent: "center",
34
+ alignItems: "center",
35
+ overflow: "hidden",
36
+ left: "0px",
37
+ right: "0px",
38
+ top: "0px",
39
+ bottom: "0px",
40
+ "& .M4LStack-root": {
41
+ overflow: "hidden"
42
+ }
43
+ },
44
+ /**
45
+ * Estilos para el splitResizeHandle
46
+ */
47
+ splitResizeHandle: ({ theme }) => ({
48
+ position: "relative",
49
+ "&.M4LSplitLayout-splitResizeHandle-horizontal": {
50
+ width: "2px",
51
+ margin: "1px 0px",
52
+ background: theme.vars.palette.border.default,
53
+ "&:before": {
54
+ position: "absolute",
55
+ display: "flex",
56
+ content: `""`,
57
+ width: "4px",
58
+ height: "56px",
59
+ left: "-1px",
60
+ top: "calc(50% - 30.5px)",
61
+ background: theme.vars.palette.primary.enabled,
62
+ borderRadius: theme.vars.size.borderRadius["r0-5"],
63
+ zIndex: "1"
64
+ },
65
+ "&:hover:before": {
66
+ background: theme.vars.palette.primary.hover
67
+ },
68
+ "&:active:before": {
69
+ background: theme.vars.palette.primary.hover
70
+ }
71
+ },
72
+ "&.M4LSplitLayout-splitResizeHandle-vertical": {
73
+ height: "2px",
74
+ margin: "0px 1px",
75
+ background: theme.vars.palette.border.default,
76
+ "&:before": {
77
+ position: "absolute",
78
+ display: "flex",
79
+ content: `""`,
80
+ width: "56px",
81
+ height: "4px",
82
+ top: "-1px",
83
+ left: "calc(50% - 22.5px)",
84
+ background: theme.vars.palette.primary.enabled,
85
+ borderRadius: theme.vars.size.borderRadius["r0-5"],
86
+ zIndex: "1"
87
+ },
88
+ "&:hover:before": {
89
+ background: theme.vars.palette.primary.hover
90
+ },
91
+ "&:active:before": {
92
+ background: theme.vars.palette.primary.hover
93
+ }
94
+ }
95
+ })
96
+ };
97
+ export {
98
+ splitLayoutStyles as s
99
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Clave del componente SplitLayout
3
+ */
4
+ export declare const SPLIT_LAYOUT_KEY_COMPONENT = "M4LSplitLayout";
@@ -0,0 +1,4 @@
1
+ const SPLIT_LAYOUT_KEY_COMPONENT = "M4LSplitLayout";
2
+ export {
3
+ SPLIT_LAYOUT_KEY_COMPONENT as S
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './SplitLayout';
2
+ export type { SplitPosition } from './types';
@@ -0,0 +1,6 @@
1
+ export declare enum SplitLayoutSlots {
2
+ root = "root",
3
+ splitMaster = "splitMaster",
4
+ splitDetail = "splitDetail",
5
+ splitResizeHandle = "splitResizeHandle"
6
+ }
@@ -2,6 +2,7 @@ var SplitLayoutSlots = /* @__PURE__ */ ((SplitLayoutSlots2) => {
2
2
  SplitLayoutSlots2["root"] = "root";
3
3
  SplitLayoutSlots2["splitMaster"] = "splitMaster";
4
4
  SplitLayoutSlots2["splitDetail"] = "splitDetail";
5
+ SplitLayoutSlots2["splitResizeHandle"] = "splitResizeHandle";
5
6
  return SplitLayoutSlots2;
6
7
  })(SplitLayoutSlots || {});
7
8
  export {
@@ -0,0 +1,65 @@
1
+ export declare const SplitLayoutRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('react').HTMLAttributes<keyof HTMLElementTagNameMap>, "id"> & {
2
+ autoSaveId?: string | null | undefined;
3
+ className?: string | undefined;
4
+ direction: import('react-resizable-panels/dist/declarations/src/types').Direction;
5
+ id?: string | null | undefined;
6
+ keyboardResizeBy?: number | null | undefined;
7
+ onLayout?: import('react-resizable-panels').PanelGroupOnLayout | null | undefined;
8
+ storage?: import('react-resizable-panels').PanelGroupStorage | undefined;
9
+ style?: import('react').CSSProperties | undefined;
10
+ tagName?: keyof HTMLElementTagNameMap | undefined;
11
+ dir?: "auto" | "ltr" | "rtl" | undefined;
12
+ } & {
13
+ children?: import('react').ReactNode;
14
+ } & import('react').RefAttributes<import('react-resizable-panels').ImperativePanelGroupHandle>, "children" | "title" | "storage" | "id" | "direction" | "hidden" | "color" | "content" | "style" | "translate" | "className" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoSaveId" | "keyboardResizeBy" | "onLayout" | "tagName" | keyof import('react').RefAttributes<import('react-resizable-panels').ImperativePanelGroupHandle>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
15
+ export declare const SplitMasterStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('react').HTMLAttributes<HTMLElement | HTMLDivElement | HTMLSpanElement | HTMLObjectElement | HTMLMapElement | HTMLLinkElement | HTMLTitleElement | HTMLInputElement | HTMLProgressElement | HTMLSelectElement | HTMLDataElement | HTMLHeadElement | HTMLBaseElement | HTMLHeadingElement | HTMLBodyElement | HTMLButtonElement | HTMLMeterElement | HTMLTextAreaElement | HTMLStyleElement | HTMLTableElement | HTMLEmbedElement | HTMLPreElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLFieldSetElement | HTMLFormElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
16
+ className?: string | undefined;
17
+ collapsedSize?: number | undefined;
18
+ collapsible?: boolean | undefined;
19
+ defaultSize?: number | undefined;
20
+ id?: string | undefined;
21
+ maxSize?: number | undefined;
22
+ minSize?: number | undefined;
23
+ onCollapse?: import('react-resizable-panels').PanelOnCollapse | undefined;
24
+ onExpand?: import('react-resizable-panels').PanelOnExpand | undefined;
25
+ onResize?: import('react-resizable-panels').PanelOnResize | undefined;
26
+ order?: number | undefined;
27
+ style?: object | undefined;
28
+ tagName?: keyof HTMLElementTagNameMap | undefined;
29
+ } & {
30
+ children?: import('react').ReactNode;
31
+ } & import('react').RefAttributes<import('react-resizable-panels').ImperativePanelHandle>, "children" | "title" | "id" | "hidden" | "color" | "content" | "style" | "order" | "translate" | "className" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultSize" | "minSize" | "maxSize" | "tagName" | "collapsedSize" | "collapsible" | "onCollapse" | "onExpand" | keyof import('react').RefAttributes<import('react-resizable-panels').ImperativePanelHandle>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
32
+ export declare const SplitDetailStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('react').HTMLAttributes<HTMLElement | HTMLDivElement | HTMLSpanElement | HTMLObjectElement | HTMLMapElement | HTMLLinkElement | HTMLTitleElement | HTMLInputElement | HTMLProgressElement | HTMLSelectElement | HTMLDataElement | HTMLHeadElement | HTMLBaseElement | HTMLHeadingElement | HTMLBodyElement | HTMLButtonElement | HTMLMeterElement | HTMLTextAreaElement | HTMLStyleElement | HTMLTableElement | HTMLEmbedElement | HTMLPreElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLQuoteElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLFieldSetElement | HTMLFormElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTimeElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
33
+ className?: string | undefined;
34
+ collapsedSize?: number | undefined;
35
+ collapsible?: boolean | undefined;
36
+ defaultSize?: number | undefined;
37
+ id?: string | undefined;
38
+ maxSize?: number | undefined;
39
+ minSize?: number | undefined;
40
+ onCollapse?: import('react-resizable-panels').PanelOnCollapse | undefined;
41
+ onExpand?: import('react-resizable-panels').PanelOnExpand | undefined;
42
+ onResize?: import('react-resizable-panels').PanelOnResize | undefined;
43
+ order?: number | undefined;
44
+ style?: object | undefined;
45
+ tagName?: keyof HTMLElementTagNameMap | undefined;
46
+ } & {
47
+ children?: import('react').ReactNode;
48
+ } & import('react').RefAttributes<import('react-resizable-panels').ImperativePanelHandle>, "children" | "title" | "id" | "hidden" | "color" | "content" | "style" | "order" | "translate" | "className" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultSize" | "minSize" | "maxSize" | "tagName" | "collapsedSize" | "collapsible" | "onCollapse" | "onExpand" | keyof import('react').RefAttributes<import('react-resizable-panels').ImperativePanelHandle>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
49
+ export declare const SplitResizeHandleStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('react').HTMLAttributes<keyof HTMLElementTagNameMap>, "id" | "onFocus" | "onBlur" | "onClick" | "onPointerDown" | "onPointerUp"> & {
50
+ className?: string;
51
+ disabled?: boolean;
52
+ hitAreaMargins?: import('react-resizable-panels').PointerHitAreaMargins;
53
+ id?: string | null;
54
+ onBlur?: () => void;
55
+ onClick?: () => void;
56
+ onDragging?: import('react-resizable-panels').PanelResizeHandleOnDragging;
57
+ onFocus?: () => void;
58
+ onPointerDown?: () => void;
59
+ onPointerUp?: () => void;
60
+ style?: import('react').CSSProperties;
61
+ tabIndex?: number;
62
+ tagName?: keyof HTMLElementTagNameMap;
63
+ } & {
64
+ children?: import('react').ReactNode | undefined;
65
+ }, "children" | "title" | "id" | "disabled" | "hidden" | "color" | "content" | "style" | "translate" | "className" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tagName" | "hitAreaMargins" | "onDragging"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {}>;
@@ -0,0 +1,27 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { PanelGroup, Panel, PanelResizeHandle } from "react-resizable-panels";
3
+ import { S as SPLIT_LAYOUT_KEY_COMPONENT } from "../constants.js";
4
+ import { s as splitLayoutStyles } from "../SplitLayout.styles.js";
5
+ import { S as SplitLayoutSlots } from "./SplitLayoutEnum.js";
6
+ const SplitLayoutRootStyled = styled(PanelGroup, {
7
+ slot: SplitLayoutSlots.root,
8
+ name: SPLIT_LAYOUT_KEY_COMPONENT
9
+ })(splitLayoutStyles.root);
10
+ const SplitMasterStyled = styled(Panel, {
11
+ slot: SplitLayoutSlots.splitMaster,
12
+ name: SPLIT_LAYOUT_KEY_COMPONENT
13
+ })(splitLayoutStyles.splitMaster);
14
+ const SplitDetailStyled = styled(Panel, {
15
+ slot: SplitLayoutSlots.splitDetail,
16
+ name: SPLIT_LAYOUT_KEY_COMPONENT
17
+ })(splitLayoutStyles.splitDetail);
18
+ const SplitResizeHandleStyled = styled(PanelResizeHandle, {
19
+ slot: SplitLayoutSlots.splitResizeHandle,
20
+ name: SPLIT_LAYOUT_KEY_COMPONENT
21
+ })(splitLayoutStyles.splitResizeHandle);
22
+ export {
23
+ SplitLayoutRootStyled as S,
24
+ SplitMasterStyled as a,
25
+ SplitResizeHandleStyled as b,
26
+ SplitDetailStyled as c
27
+ };
@@ -0,0 +1,17 @@
1
+ import { Theme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { M4LOverridesStyleRules } from '../../../@types/augmentations';
4
+ import { SPLIT_LAYOUT_KEY_COMPONENT } from './constants';
5
+ import { SplitLayoutSlots as slots } from './slots/SplitLayoutEnum';
6
+ export type SplitPosition = 'vertical' | 'horizontal' | 'none';
7
+ export interface SplitLayoutProps {
8
+ /**representa el contenido o componente que se mostrará en la primera parte de la interfaz de usuario. */
9
+ firstPart?: ((props?: any) => JSX.Element) | ReactNode;
10
+ /** representa el contenido o componente que se mostrará en la segunda parte de la interfaz de usuario,la parte sea de abajo o a la derecha*/
11
+ secondPart?: ((props?: any) => JSX.Element) | ReactNode;
12
+ /** determina la orientación de la división entre las dos partes de la interfaz de usuario. Puede tener tres valores: "vertical", "horizontal" o "none". */
13
+ splitPosition: SplitPosition;
14
+ /** se utiliza el `dataTestId` para las pruebas unitarias */
15
+ dataTestId?: string;
16
+ }
17
+ export type SplitLayoutStyles = M4LOverridesStyleRules<keyof typeof slots, typeof SPLIT_LAYOUT_KEY_COMPONENT, Theme>;
@@ -1,4 +1,4 @@
1
1
  export * from './React-Resizable';
2
- export * from './React-Splitter-Layout';
2
+ export * from './React-resizable-panels';
3
3
  export * from './React-Spinners';
4
4
  export * from './React-Window';
package/index.js CHANGED
@@ -65,7 +65,7 @@ import { S as S2 } from "./components/DynamicSort/helpers/frontEndHelpers.js";
65
65
  import { D as D5 } from "./components/DynamicSort/DynamicSort.js";
66
66
  import { R } from "./components/extended/React-Resizable/Resizable/Resizable.js";
67
67
  import { R as R2 } from "./components/extended/React-Resizable/ResizableBox/ResizableBox.js";
68
- import { S as S3 } from "./components/extended/React-Splitter-Layout/SplitLayout.js";
68
+ import { S as S3 } from "./components/extended/React-resizable-panels/SplitLayout.js";
69
69
  import { P } from "./components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.js";
70
70
  import { F } from "./components/extended/React-Window/FixedSizeList/FixedSizeList.js";
71
71
  import { V } from "./components/extended/React-Window/VariableSizeList/VariableSizeList.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.41",
3
+ "version": "9.2.42",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0 --no-warn-ignored"
@@ -48,6 +48,7 @@
48
48
  "react-intersection-observer": "^9.4.0",
49
49
  "react-leaflet": "^4.2.1",
50
50
  "react-resizable": "^3.0.4",
51
+ "react-resizable-panels": "^2.1.8",
51
52
  "react-rnd": "^10.5.2",
52
53
  "react-router-dom": "6.3.0",
53
54
  "react-spinners": "^0.13.8",
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { SplitLayout } from '../../../../src/components/extended/React-resizable-panels/SplitLayout';
3
+ declare const meta: Meta<typeof SplitLayout>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SplitLayout>;
6
+ /**
7
+ * Componente `SplitLayout` con historia por base
8
+ */
9
+ export declare const Base: Story;
10
+ /**
11
+ * Componente `SplitLayout` con las `props` `firstPart` y `secondPart`
12
+ */
13
+ export declare const WithProps: Story;
package/commonjs/index.js DELETED
@@ -1,8 +0,0 @@
1
- import "prop-types";
2
- import "react";
3
- function getDefaultExportFromCjs(x) {
4
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
- }
6
- export {
7
- getDefaultExportFromCjs as g
8
- };
@@ -1,53 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { clsx } from "clsx";
3
- import { S as SplitterLayout } from "../../../internal_libs/react-splitter-layout.js";
4
- import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
5
- import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
6
- import { S as SplitLayoutRootStyled, a as SplitMasterStyled, b as SplitDetailStyled } from "./slots/SplitLayoutSlots.js";
7
- import { S as SplitLayoutSlots } from "./slots/SplitLayoutEnum.js";
8
- import { S as SPLIT_LAYOUT_PREFIX, a as SPLIT_LAYOUT_KEY_COMPONENT } from "./constants.js";
9
- const SplitLayout = (props) => {
10
- const {
11
- splitPosition,
12
- firstPart,
13
- secondPart,
14
- secondParrtInitialSize = 50,
15
- percentage = true,
16
- dataTestId,
17
- className
18
- } = props;
19
- return /* @__PURE__ */ jsx(
20
- SplitLayoutRootStyled,
21
- {
22
- ...getPropDataTestId(SPLIT_LAYOUT_PREFIX, SplitLayoutSlots.root, dataTestId),
23
- className: clsx(getComponentSlotRoot(SPLIT_LAYOUT_KEY_COMPONENT), className),
24
- children: /* @__PURE__ */ jsxs(
25
- SplitterLayout,
26
- {
27
- vertical: splitPosition === "vertical",
28
- percentage,
29
- secondaryInitialSize: secondParrtInitialSize,
30
- children: [
31
- /* @__PURE__ */ jsx(
32
- SplitMasterStyled,
33
- {
34
- ...getPropDataTestId(SPLIT_LAYOUT_PREFIX, SplitLayoutSlots.splitMaster, dataTestId),
35
- children: typeof firstPart === "function" ? firstPart() : firstPart
36
- }
37
- ),
38
- splitPosition !== "none" && /* @__PURE__ */ jsx(
39
- SplitDetailStyled,
40
- {
41
- ...getPropDataTestId(SPLIT_LAYOUT_PREFIX, SplitLayoutSlots.splitDetail, dataTestId),
42
- children: typeof secondPart === "function" ? secondPart() : secondPart
43
- }
44
- )
45
- ]
46
- }
47
- )
48
- }
49
- );
50
- };
51
- export {
52
- SplitLayout as S
53
- };
@@ -1,157 +0,0 @@
1
- const splitLayoutStyles = {
2
- /**
3
- * Estilos para root
4
- */
5
- root: ({ theme }) => ({
6
- display: "flex",
7
- flexDirection: "column",
8
- position: "relative",
9
- flexGrow: 1,
10
- overflow: "hidden",
11
- // Configuracion por defecto en horizontal
12
- "& .splitter-layout": {
13
- position: "absolute",
14
- display: "flex",
15
- flexDirection: "row",
16
- width: "100%",
17
- height: "100%",
18
- overflow: "hidden",
19
- gap: theme.vars.size.baseSpacings.sp2
20
- },
21
- // Configuracion de ambos paneles a dividir
22
- "& .splitter-layout .layout-pane": {
23
- position: "relative",
24
- flex: "0 0 auto",
25
- overflow: "hidden"
26
- },
27
- // Configuración del panel principal
28
- "& .splitter-layout .layout-pane.layout-pane-primary": {
29
- flex: "1 1 auto"
30
- },
31
- // Configuración del cursor en horizontal
32
- "& .splitter-layout.layout-changing": {
33
- cursor: "col-resize"
34
- },
35
- // Configuración barran grande cuando es horizontal
36
- "& .splitter-layout > .layout-splitter": {
37
- display: "flex",
38
- alignItems: "center",
39
- backgroundColor: "none",
40
- boxSizing: "border-box",
41
- backgroundClip: "padding-box",
42
- // Propiedades del horizontal
43
- width: "8px",
44
- margin: "0 0.5px",
45
- borderLeft: "4px solid hsla(0, 0%, 5%, 0)",
46
- borderRight: "4px solid hsla(0, 0%, 5%, 0)",
47
- cursor: "col-resize",
48
- justifyContent: "center",
49
- height: "100%"
50
- },
51
- // Configuración divisorra interna posición horizontal del split
52
- "& .splitter-layout .layout-splitter:before": {
53
- content: `""`,
54
- height: "56px",
55
- width: "4px",
56
- top: "calc(50% - 22.5px)",
57
- position: "absolute",
58
- background: theme.vars.palette.primary.enabled,
59
- borderRadius: theme.vars.size.borderRadius["r0-5"],
60
- margin: "1px 0px"
61
- },
62
- // Hover de la barra externa en posición horizontal
63
- "& .splitter-layout > .layout-splitter:hover": {
64
- borderRadius: "2px",
65
- borderLeft: `2px`,
66
- borderRight: `2px`
67
- },
68
- // Configuración del cursor en horizontal
69
- "& .splitter-layout.splitter-layout-vertical.layout-changing": {
70
- cursor: "row-resize"
71
- },
72
- // Barra divisora vertical del split
73
- "& .splitter-layout.splitter-layout-vertical > .layout-splitter": {
74
- height: theme.vars.size.baseSpacings.sp2,
75
- width: "100% !important",
76
- margin: "1px 0",
77
- cursor: "row-resize"
78
- },
79
- // Configuración barra divisora interna vertical del split
80
- "& .splitter-layout.splitter-layout-vertical .layout-splitter:before": {
81
- width: "56px !important",
82
- height: "4px !important",
83
- left: "calc(50% - 22.5px)",
84
- top: "unset",
85
- background: theme.vars.palette.primary.enabled,
86
- borderRadius: "2px",
87
- zIndex: "1"
88
- },
89
- // Color del hover y el arrastrando del splitter
90
- "& .splitter-layout > .layout-splitter:hover:before, .splitter-layout.layout-changing > .layout-splitter:before": {
91
- // barra interna vertical
92
- background: theme.vars.palette.primary.hover
93
- },
94
- // Dirección flex cuando es vertical
95
- "& .splitter-layout.splitter-layout-vertical": {
96
- flexDirection: "column",
97
- position: "relative",
98
- "& .layout-splitter:after": {
99
- content: `""`,
100
- height: "2px",
101
- left: "0",
102
- right: "0",
103
- /* top: 'calc(50% - 6px)', */
104
- position: "absolute",
105
- background: theme.vars.palette?.border.default
106
- }
107
- },
108
- "& .splitter-layout:not(.splitter-layout-vertical)": {
109
- "& .layout-splitter:after": {
110
- content: `""`,
111
- width: "2px",
112
- top: "0",
113
- bottom: "0",
114
- position: "absolute",
115
- background: theme.vars.palette?.border.default
116
- }
117
- }
118
- }),
119
- /**
120
- * SplitMaster firstPart
121
- */
122
- splitMaster: () => ({
123
- position: "relative",
124
- width: "100%",
125
- height: "100%",
126
- display: "flex",
127
- flexDirection: "column",
128
- overflow: "hidden",
129
- "& .M4LStack-root": {
130
- gap: "8px"
131
- }
132
- }),
133
- /**
134
- * SplitMaster secondPart
135
- */
136
- splitDetail: () => ({
137
- position: "relative",
138
- width: "100%",
139
- height: "100%",
140
- display: "flex",
141
- flexDirection: "column",
142
- justifyContent: "center",
143
- alignItems: "center",
144
- overflow: "hidden",
145
- left: "0px",
146
- right: "0px",
147
- top: "0px",
148
- bottom: "0px",
149
- "& .M4LStack-root": {
150
- //gap: '8px',
151
- overflow: "hidden"
152
- }
153
- })
154
- };
155
- export {
156
- splitLayoutStyles as s
157
- };
@@ -1,6 +0,0 @@
1
- const SPLIT_LAYOUT_KEY_COMPONENT = "M4LSplitLayout";
2
- const SPLIT_LAYOUT_PREFIX = "M4LSplitLayout";
3
- export {
4
- SPLIT_LAYOUT_PREFIX as S,
5
- SPLIT_LAYOUT_KEY_COMPONENT as a
6
- };
@@ -1,21 +0,0 @@
1
- import { styled } from "@mui/material/styles";
2
- import { s as splitLayoutStyles } from "../SplitLayout.styles.js";
3
- import { a as SPLIT_LAYOUT_KEY_COMPONENT } from "../constants.js";
4
- import { S as SplitLayoutSlots } from "./SplitLayoutEnum.js";
5
- const SplitLayoutRootStyled = styled("div", {
6
- name: SPLIT_LAYOUT_KEY_COMPONENT,
7
- slot: SplitLayoutSlots.root
8
- })(splitLayoutStyles.root);
9
- const SplitMasterStyled = styled("div", {
10
- name: SPLIT_LAYOUT_KEY_COMPONENT,
11
- slot: SplitLayoutSlots.splitMaster
12
- })(splitLayoutStyles.splitMaster);
13
- const SplitDetailStyled = styled("div", {
14
- name: SPLIT_LAYOUT_KEY_COMPONENT,
15
- slot: SplitLayoutSlots.splitDetail
16
- })(splitLayoutStyles.splitDetail);
17
- export {
18
- SplitLayoutRootStyled as S,
19
- SplitMasterStyled as a,
20
- SplitDetailStyled as b
21
- };
@@ -1,158 +0,0 @@
1
- import { g as getDefaultExportFromCjs } from "../commonjs/index.js";
2
- import require$$0 from "prop-types";
3
- import React from "react";
4
- var lib = { exports: {} };
5
- (function(module, exports) {
6
- !function(e, t) {
7
- module.exports = t(require$$0, React);
8
- }(window, function(e, t) {
9
- return function(e2) {
10
- var t2 = {};
11
- function n(o) {
12
- if (t2[o]) return t2[o].exports;
13
- var r = t2[o] = { i: o, l: false, exports: {} };
14
- return e2[o].call(r.exports, r, r.exports, n), r.l = true, r.exports;
15
- }
16
- return n.m = e2, n.c = t2, n.d = function(e3, t3, o) {
17
- n.o(e3, t3) || Object.defineProperty(e3, t3, { enumerable: true, get: o });
18
- }, n.r = function(e3) {
19
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e3, "__esModule", { value: true });
20
- }, n.t = function(e3, t3) {
21
- if (1 & t3 && (e3 = n(e3)), 8 & t3) return e3;
22
- if (4 & t3 && "object" == typeof e3 && e3 && e3.__esModule) return e3;
23
- var o = /* @__PURE__ */ Object.create(null);
24
- if (n.r(o), Object.defineProperty(o, "default", { enumerable: true, value: e3 }), 2 & t3 && "string" != typeof e3) for (var r in e3) n.d(o, r, function(t4) {
25
- return e3[t4];
26
- }.bind(null, r));
27
- return o;
28
- }, n.n = function(e3) {
29
- var t3 = e3 && e3.__esModule ? function() {
30
- return e3.default;
31
- } : function() {
32
- return e3;
33
- };
34
- return n.d(t3, "a", t3), t3;
35
- }, n.o = function(e3, t3) {
36
- return Object.prototype.hasOwnProperty.call(e3, t3);
37
- }, n.p = "", n(n.s = 2);
38
- }([function(t2, n) {
39
- t2.exports = e;
40
- }, function(e2, n) {
41
- e2.exports = t;
42
- }, function(e2, t2, n) {
43
- e2.exports = n(3);
44
- }, function(e2, t2, n) {
45
- n.r(t2);
46
- var o = n(1), r = n.n(o), i = n(0), a = n.n(i);
47
- function s(e3) {
48
- var t3 = e3.size || 0, n2 = e3.percentage ? "%" : "px", o2 = "layout-pane", i2 = {};
49
- return e3.primary ? o2 += " layout-pane-primary" : e3.vertical ? i2.height = "".concat(t3).concat(n2) : i2.width = "".concat(t3).concat(n2), r.a.createElement("div", { className: o2, style: i2 }, e3.children);
50
- }
51
- s.propTypes = { vertical: a.a.bool, primary: a.a.bool, size: a.a.number, percentage: a.a.bool, children: a.a.oneOfType([a.a.arrayOf(a.a.node), a.a.node]) }, s.defaultProps = { vertical: false, primary: false, size: 0, percentage: false, children: [] };
52
- var c = s;
53
- function l(e3) {
54
- return (l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
55
- return typeof e4;
56
- } : function(e4) {
57
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
58
- })(e3);
59
- }
60
- function u(e3, t3) {
61
- for (var n2 = 0; n2 < t3.length; n2++) {
62
- var o2 = t3[n2];
63
- o2.enumerable = o2.enumerable || false, o2.configurable = true, "value" in o2 && (o2.writable = true), Object.defineProperty(e3, o2.key, o2);
64
- }
65
- }
66
- function p(e3) {
67
- return (p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e4) {
68
- return e4.__proto__ || Object.getPrototypeOf(e4);
69
- })(e3);
70
- }
71
- function d(e3, t3) {
72
- return (d = Object.setPrototypeOf || function(e4, t4) {
73
- return e4.__proto__ = t4, e4;
74
- })(e3, t3);
75
- }
76
- function h(e3) {
77
- if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
78
- return e3;
79
- }
80
- function f() {
81
- if (document.body.createTextRange) {
82
- var e3 = document.body.createTextRange();
83
- e3.collapse(), e3.select();
84
- } else window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty();
85
- }
86
- var y = function(e3) {
87
- function t3(e4) {
88
- var n3, o3, r2;
89
- return function(e5, t4) {
90
- if (!(e5 instanceof t4)) throw new TypeError("Cannot call a class as a function");
91
- }(this, t3), o3 = this, (n3 = !(r2 = p(t3).call(this, e4)) || "object" !== l(r2) && "function" != typeof r2 ? h(o3) : r2).handleResize = n3.handleResize.bind(h(h(n3))), n3.handleMouseMove = n3.handleMouseMove.bind(h(h(n3))), n3.handleMouseUp = n3.handleMouseUp.bind(h(h(n3))), n3.handleTouchMove = n3.handleTouchMove.bind(h(h(n3))), n3.handleSplitterMouseDown = n3.handleSplitterMouseDown.bind(h(h(n3))), n3.state = { secondaryPaneSize: 0, resizing: false }, n3;
92
- }
93
- var n2, o2;
94
- return function(e4, t4) {
95
- if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function");
96
- e4.prototype = Object.create(t4 && t4.prototype, { constructor: { value: e4, writable: true, configurable: true } }), t4 && d(e4, t4);
97
- }(t3, r.a.Component), n2 = t3, (o2 = [{ key: "componentDidMount", value: function() {
98
- var e4;
99
- if (window.addEventListener("resize", this.handleResize), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchend", this.handleMouseUp), document.addEventListener("touchmove", this.handleTouchMove), void 0 !== this.props.secondaryInitialSize) e4 = this.props.secondaryInitialSize;
100
- else {
101
- var t4, n3 = this.container.getBoundingClientRect();
102
- t4 = this.splitter ? this.splitter.getBoundingClientRect() : { width: 4, height: 4 }, e4 = this.getSecondaryPaneSize(n3, t4, { left: n3.left + (n3.width - t4.width) / 2, top: n3.top + (n3.height - t4.height) / 2 }, false);
103
- }
104
- this.setState({ secondaryPaneSize: e4 });
105
- } }, { key: "componentDidUpdate", value: function(e4, t4) {
106
- t4.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange && this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize), t4.resizing !== this.state.resizing && (this.state.resizing ? this.props.onDragStart && this.props.onDragStart() : this.props.onDragEnd && this.props.onDragEnd());
107
- } }, { key: "componentWillUnmount", value: function() {
108
- window.removeEventListener("resize", this.handleResize), document.removeEventListener("mouseup", this.handleMouseUp), document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("touchend", this.handleMouseUp), document.removeEventListener("touchmove", this.handleTouchMove);
109
- } }, { key: "getSecondaryPaneSize", value: function(e4, t4, n3, o3) {
110
- var r2, i2, a2, s2;
111
- this.props.vertical ? (r2 = e4.height, i2 = t4.height, a2 = n3.top - e4.top) : (r2 = e4.width, i2 = t4.width, a2 = n3.left - e4.left), o3 && (a2 -= i2 / 2), a2 < 0 ? a2 = 0 : a2 > r2 - i2 && (a2 = r2 - i2);
112
- var c2 = r2 - i2 - (s2 = 1 === this.props.primaryIndex ? a2 : r2 - i2 - a2);
113
- return this.props.percentage && (s2 = 100 * s2 / r2, c2 = 100 * c2 / r2, i2 = 100 * i2 / r2, r2 = 100), c2 < this.props.primaryMinSize ? s2 = Math.max(s2 - (this.props.primaryMinSize - c2), 0) : s2 < this.props.secondaryMinSize && (s2 = Math.min(r2 - i2 - this.props.primaryMinSize, this.props.secondaryMinSize)), s2;
114
- } }, { key: "handleResize", value: function() {
115
- if (this.splitter && !this.props.percentage) {
116
- var e4 = this.container.getBoundingClientRect(), t4 = this.splitter.getBoundingClientRect(), n3 = this.getSecondaryPaneSize(e4, t4, { left: t4.left, top: t4.top }, false);
117
- this.setState({ secondaryPaneSize: n3 });
118
- }
119
- } }, { key: "handleMouseMove", value: function(e4) {
120
- if (this.state.resizing) {
121
- var t4 = this.container.getBoundingClientRect(), n3 = this.splitter.getBoundingClientRect(), o3 = this.getSecondaryPaneSize(t4, n3, { left: e4.clientX, top: e4.clientY }, true);
122
- f(), this.setState({ secondaryPaneSize: o3 });
123
- }
124
- } }, { key: "handleTouchMove", value: function(e4) {
125
- this.handleMouseMove(e4.changedTouches[0]);
126
- } }, { key: "handleSplitterMouseDown", value: function() {
127
- f(), this.setState({ resizing: true });
128
- } }, { key: "handleMouseUp", value: function() {
129
- this.setState(function(e4) {
130
- return e4.resizing ? { resizing: false } : null;
131
- });
132
- } }, { key: "render", value: function() {
133
- var e4 = this, t4 = "splitter-layout";
134
- this.props.customClassName && (t4 += " ".concat(this.props.customClassName)), this.props.vertical && (t4 += " splitter-layout-vertical"), this.state.resizing && (t4 += " layout-changing");
135
- var n3 = r.a.Children.toArray(this.props.children).slice(0, 2);
136
- 0 === n3.length && n3.push(r.a.createElement("div", null));
137
- for (var o3 = [], i2 = 0 !== this.props.primaryIndex && 1 !== this.props.primaryIndex ? 0 : this.props.primaryIndex, a2 = 0; a2 < n3.length; ++a2) {
138
- var s2 = true, l2 = null;
139
- n3.length > 1 && a2 !== i2 && (s2 = false, l2 = this.state.secondaryPaneSize), o3.push(r.a.createElement(c, { vertical: this.props.vertical, percentage: this.props.percentage, primary: s2, size: l2 }, n3[a2]));
140
- }
141
- return r.a.createElement("div", { className: t4, ref: function(t5) {
142
- e4.container = t5;
143
- } }, o3[0], o3.length > 1 && r.a.createElement("div", { role: "separator", className: "layout-splitter", ref: function(t5) {
144
- e4.splitter = t5;
145
- }, onMouseDown: this.handleSplitterMouseDown, onTouchStart: this.handleSplitterMouseDown }), o3.length > 1 && o3[1]);
146
- } }]) && u(n2.prototype, o2), t3;
147
- }();
148
- y.propTypes = { customClassName: a.a.string, vertical: a.a.bool, percentage: a.a.bool, primaryIndex: a.a.number, primaryMinSize: a.a.number, secondaryInitialSize: a.a.number, secondaryMinSize: a.a.number, onDragStart: a.a.func, onDragEnd: a.a.func, onSecondaryPaneSizeChange: a.a.func, children: a.a.arrayOf(a.a.node) }, y.defaultProps = { customClassName: "", vertical: false, percentage: false, primaryIndex: 0, primaryMinSize: 0, secondaryInitialSize: void 0, secondaryMinSize: 0, onDragStart: null, onDragEnd: null, onSecondaryPaneSizeChange: null, children: [] };
149
- var m = y;
150
- t2.default = m;
151
- }]);
152
- });
153
- })(lib);
154
- var libExports = lib.exports;
155
- const SplitterLayout = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
156
- export {
157
- SplitterLayout as S
158
- };