@m4l/components 9.2.39 → 9.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/mui_extended/TabContent/TabContent.d.ts +1 -1
- package/components/mui_extended/TabContent/TabContent.js +5 -5
- package/components/mui_extended/TabContent/TabContent.styles.d.ts +2 -0
- package/components/mui_extended/TabContent/TabContent.styles.js +32 -0
- package/components/mui_extended/TabContent/constants.d.ts +1 -0
- package/components/mui_extended/TabContent/constants.js +4 -0
- package/components/mui_extended/TabContent/index.d.ts +0 -1
- package/components/mui_extended/TabContent/slots/TabContentEnum.d.ts +3 -0
- package/components/mui_extended/TabContent/slots/TabContentEnum.js +7 -0
- package/components/mui_extended/TabContent/slots/TabContentSlots.d.ts +3 -0
- package/components/mui_extended/TabContent/slots/TabContentSlots.js +11 -0
- package/components/mui_extended/TabContent/types.d.ts +6 -2
- package/components/mui_extended/Tabs/Tabs.styles.js +5 -2
- package/package.json +1 -1
- package/storybook/components/extended/mui/TabContent/TabContent.stories.d.ts +17 -0
- package/components/mui_extended/TabContent/classes/constants.d.ts +0 -1
- package/components/mui_extended/TabContent/classes/constants.js +0 -4
- package/components/mui_extended/TabContent/classes/index.d.ts +0 -9
- package/components/mui_extended/TabContent/classes/index.js +0 -23
- package/components/mui_extended/TabContent/classes/types.d.ts +0 -6
- package/components/mui_extended/TabContent/styles.d.ts +0 -1
- package/components/mui_extended/TabContent/styles.js +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { T as
|
|
2
|
+
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
3
|
+
import { T as TAB_CONTENT_KEY_COMPONENT } from "./constants.js";
|
|
4
|
+
import { T as TabContentRootStyled } from "./slots/TabContentSlots.js";
|
|
5
5
|
const TabContent = (props) => {
|
|
6
6
|
const { children, className, ...others } = props;
|
|
7
|
-
const
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
+
const root = getComponentSlotRoot(TAB_CONTENT_KEY_COMPONENT);
|
|
8
|
+
return /* @__PURE__ */ jsx(TabContentRootStyled, { ownerState: {}, className: root, ...others, children });
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
TabContent as T
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const tabContentStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Elemento root referencia a `TabContent`
|
|
4
|
+
*/
|
|
5
|
+
root: ({ theme }) => ({
|
|
6
|
+
padding: theme.vars.size.baseSpacings.sp3,
|
|
7
|
+
display: "flex",
|
|
8
|
+
overflow: "hidden",
|
|
9
|
+
height: "100%",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
12
|
+
background: theme.vars.palette.background.default,
|
|
13
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
14
|
+
borderTopLeftRadius: theme.vars.size.borderRadius.r0,
|
|
15
|
+
position: "relative",
|
|
16
|
+
flex: 1,
|
|
17
|
+
border: theme.vars.size.borderStroke.container,
|
|
18
|
+
borderColor: theme.vars.palette?.border.secondary,
|
|
19
|
+
boxSizing: "border-box",
|
|
20
|
+
zIndex: "0",
|
|
21
|
+
top: "-1px",
|
|
22
|
+
"& .M4LStack-root": {
|
|
23
|
+
gap: `${theme.vars.size.baseSpacings.sp2} !important`
|
|
24
|
+
},
|
|
25
|
+
"&.M4LTabContent-root > div": {
|
|
26
|
+
gap: theme.vars.size.baseSpacings.sp2
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
tabContentStyles as t
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TAB_CONTENT_KEY_COMPONENT = "M4LTabContent";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const TabContentRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../..').TabsProps> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('../..').TabsProps> & Record<string, unknown>;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { T as TAB_CONTENT_KEY_COMPONENT } from "../constants.js";
|
|
3
|
+
import { t as tabContentStyles } from "../TabContent.styles.js";
|
|
4
|
+
import { T as TabContentSlots } from "./TabContentEnum.js";
|
|
5
|
+
const TabContentRootStyled = styled("div", {
|
|
6
|
+
slot: TabContentSlots.root,
|
|
7
|
+
name: TAB_CONTENT_KEY_COMPONENT
|
|
8
|
+
})(tabContentStyles.root);
|
|
9
|
+
export {
|
|
10
|
+
TabContentRootStyled as T
|
|
11
|
+
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
1
3
|
import { Key } from 'react';
|
|
2
|
-
|
|
4
|
+
import { TABS_KEY_COMPONENT } from '../Tabs/constants';
|
|
5
|
+
import { TabContentSlots } from './slots/TabContentEnum';
|
|
6
|
+
export interface TabContentProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
7
|
children: React.ReactNode;
|
|
4
8
|
style?: React.CSSProperties;
|
|
5
9
|
key?: Key | null | undefined;
|
|
6
|
-
className?: string | undefined;
|
|
7
10
|
}
|
|
11
|
+
export type TabContentStyles = OverridesStyleRules<keyof typeof TabContentSlots, typeof TABS_KEY_COMPONENT, Theme>;
|
|
@@ -4,19 +4,22 @@ const tabsStyles = {
|
|
|
4
4
|
*/
|
|
5
5
|
root: ({ theme }) => ({
|
|
6
6
|
position: "relative",
|
|
7
|
-
zIndex:
|
|
7
|
+
zIndex: 1,
|
|
8
8
|
display: "flex",
|
|
9
9
|
overflow: "auto",
|
|
10
10
|
width: "100%",
|
|
11
11
|
height: "fit-content",
|
|
12
12
|
maxWidth: "fit-content",
|
|
13
13
|
minHeight: "fit-content",
|
|
14
|
-
background: theme.vars.palette.default
|
|
14
|
+
background: theme.vars.palette.background.default,
|
|
15
15
|
paddingBottom: theme.vars.size.baseSpacings.sp0,
|
|
16
16
|
gap: theme.vars.size.baseSpacings.sp0,
|
|
17
17
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
18
18
|
borderBottomLeftRadius: theme.vars.size.borderRadius.r0,
|
|
19
19
|
borderBottomRightRadius: theme.vars.size.borderRadius.r0,
|
|
20
|
+
"& .MuiTabs-flexContainer": {
|
|
21
|
+
background: theme.vars.palette.default.enabledOpacity
|
|
22
|
+
},
|
|
20
23
|
"& .MuiTabs-scroller": {
|
|
21
24
|
overflow: "visible !important"
|
|
22
25
|
},
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TabContent } from '../../../../../src';
|
|
3
|
+
import { Tab } from '../../../../../src/components/mui_extended/Tab';
|
|
4
|
+
/**
|
|
5
|
+
* El componente TabContent agrupa contenido de el tab seleccionado.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof TabContent>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof Tab>;
|
|
10
|
+
/**
|
|
11
|
+
* TabContent en estado Base
|
|
12
|
+
*/
|
|
13
|
+
export declare const Base: Story;
|
|
14
|
+
/**
|
|
15
|
+
* TabContent en estado Skeleton
|
|
16
|
+
*/
|
|
17
|
+
export declare const Skeleton: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const componentName = "M4LTabContent";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TabContentClassesType } from './types';
|
|
2
|
-
export declare const tabContentClasses: TabContentClassesType;
|
|
3
|
-
export declare function getTabContentUtilityClass(slot: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* TODO: Documentar
|
|
6
|
-
*/
|
|
7
|
-
export declare const useTabContentUtilityClasses: () => {
|
|
8
|
-
root: string;
|
|
9
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { c as componentName } from "./constants.js";
|
|
4
|
-
generateUtilityClasses(componentName, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root"
|
|
7
|
-
/* states or variants of elements */
|
|
8
|
-
]);
|
|
9
|
-
function getTabContentUtilityClass(slot) {
|
|
10
|
-
return generateUtilityClass(componentName, slot);
|
|
11
|
-
}
|
|
12
|
-
const useTabContentUtilityClasses = () => {
|
|
13
|
-
const slots = {
|
|
14
|
-
root: ["root"]
|
|
15
|
-
};
|
|
16
|
-
const composedClasses = unstable_composeClasses(slots, getTabContentUtilityClass, {});
|
|
17
|
-
return {
|
|
18
|
-
...composedClasses
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
useTabContentUtilityClasses as u
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TabContentRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|